mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Selections are moved to Draw
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <Transfer_FinderProcess.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
//szv_c1:#include <Transfer_TransientMapper.hxx>
|
||||
#include <TransferBRep_ShapeMapper.hxx>
|
||||
|
||||
char Name[100];
|
||||
@@ -234,8 +233,6 @@ void BRepToIGES_BREntity::AddFail
|
||||
(const Handle(Standard_Transient)& start,
|
||||
const Standard_CString amess)
|
||||
{
|
||||
/*szv_c1:Handle(Transfer_TransientMapper) Mapper = new Transfer_TransientMapper(start);
|
||||
TheMap->AddFail(Mapper, amess);*/
|
||||
TheMap->AddFail(start, amess);
|
||||
}
|
||||
|
||||
@@ -249,8 +246,6 @@ void BRepToIGES_BREntity::AddWarning
|
||||
(const Handle(Standard_Transient)& start,
|
||||
const Standard_CString amess)
|
||||
{
|
||||
/*szv_c1:Handle(Transfer_TransientMapper) Mapper = new Transfer_TransientMapper(start);
|
||||
TheMap->AddWarning(Mapper, amess);*/
|
||||
TheMap->AddWarning(start, amess);
|
||||
}
|
||||
|
||||
@@ -312,8 +307,6 @@ void BRepToIGES_BREntity::SetShapeResult
|
||||
Standard_Boolean BRepToIGES_BREntity::HasShapeResult
|
||||
(const Handle(Standard_Transient)& start) const
|
||||
{
|
||||
/*szv_c1:Handle(Transfer_TransientMapper) Mapper = new Transfer_TransientMapper(start);
|
||||
DeclareAndCast(Transfer_SimpleBinderOfTransient, binder, TheMap->Find(Mapper));*/
|
||||
DeclareAndCast(Transfer_SimpleBinderOfTransient, binder, TheMap->Find(start));
|
||||
if (binder.IsNull()) return Standard_False;
|
||||
return binder->HasResult();
|
||||
@@ -330,8 +323,6 @@ Handle(Standard_Transient) BRepToIGES_BREntity::GetShapeResult
|
||||
{
|
||||
Handle(Standard_Transient) res;
|
||||
|
||||
/*szv_c1:Handle(Transfer_TransientMapper) Mapper = new Transfer_TransientMapper(start);
|
||||
DeclareAndCast(Transfer_SimpleBinderOfTransient, binder, TheMap->Find(Mapper));*/
|
||||
DeclareAndCast(Transfer_SimpleBinderOfTransient, binder, TheMap->Find(start));
|
||||
if (binder.IsNull()) return res;
|
||||
if (binder->HasResult())
|
||||
@@ -350,8 +341,6 @@ void BRepToIGES_BREntity::SetShapeResult
|
||||
const Handle(Standard_Transient)& result)
|
||||
{
|
||||
Handle(Transfer_SimpleBinderOfTransient) binder = new Transfer_SimpleBinderOfTransient;
|
||||
/*szv_c1:Handle(Transfer_TransientMapper) Mapper = new Transfer_TransientMapper(start);
|
||||
TheMap->Bind(Mapper,binder);*/
|
||||
TheMap->Bind(start,binder);
|
||||
binder->SetResult(result);
|
||||
}
|
||||
|
@@ -14,14 +14,13 @@
|
||||
|
||||
#include <HeaderSection.hxx>
|
||||
#include <HeaderSection_Protocol.hxx>
|
||||
#include <Interface_Statics.hxx>
|
||||
|
||||
StaticHandle(HeaderSection_Protocol, proto);
|
||||
|
||||
Handle(HeaderSection_Protocol) HeaderSection::Protocol()
|
||||
|
||||
{
|
||||
InitHandleVoid(HeaderSection_Protocol, proto);
|
||||
return proto;
|
||||
}
|
||||
//szv_c1:StaticHandle(HeaderSection_Protocol, proto);
|
||||
static Handle(HeaderSection_Protocol) proto;
|
||||
|
||||
const Handle(HeaderSection_Protocol) & HeaderSection::Protocol()
|
||||
{
|
||||
//szv_c1:InitHandleVoid(HeaderSection_Protocol, proto)
|
||||
if (proto.IsNull()) proto = new HeaderSection_Protocol;
|
||||
return proto;
|
||||
}
|
||||
|
@@ -18,54 +18,15 @@
|
||||
#define _HeaderSection_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
class HeaderSection_Protocol;
|
||||
class HeaderSection_Protocol;
|
||||
class HeaderSection_FileName;
|
||||
class HeaderSection_FileDescription;
|
||||
class HeaderSection_FileSchema;
|
||||
class HeaderSection_HeaderRecognizer;
|
||||
|
||||
|
||||
|
||||
class HeaderSection
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
public:
|
||||
|
||||
//! creates a Protocol
|
||||
Standard_EXPORT static Handle(HeaderSection_Protocol) Protocol();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class HeaderSection_Protocol;
|
||||
friend class HeaderSection_FileName;
|
||||
friend class HeaderSection_FileDescription;
|
||||
friend class HeaderSection_FileSchema;
|
||||
friend class HeaderSection_HeaderRecognizer;
|
||||
|
||||
Standard_EXPORT static const Handle(HeaderSection_Protocol) & Protocol();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _HeaderSection_HeaderFile
|
||||
|
@@ -2,8 +2,6 @@ IFGraph_AllConnected.cxx
|
||||
IFGraph_AllConnected.hxx
|
||||
IFGraph_AllShared.cxx
|
||||
IFGraph_AllShared.hxx
|
||||
IFGraph_Articulations.cxx
|
||||
IFGraph_Articulations.hxx
|
||||
IFGraph_Compare.cxx
|
||||
IFGraph_Compare.hxx
|
||||
IFGraph_ConnectedComponants.cxx
|
||||
|
@@ -14,34 +14,24 @@
|
||||
|
||||
#include <IFGraph_AllShared.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
IFGraph_AllShared::IFGraph_AllShared (const Interface_Graph& agraph)
|
||||
: thegraph (agraph) { }
|
||||
|
||||
|
||||
IFGraph_AllShared::IFGraph_AllShared
|
||||
(const Interface_Graph& agraph, const Handle(Standard_Transient)& ent)
|
||||
: thegraph (agraph)
|
||||
IFGraph_AllShared::IFGraph_AllShared (const Interface_Graph& agraph, const Handle(Standard_Transient)& ent)
|
||||
: thegraph (agraph)
|
||||
{
|
||||
if (!agraph.Model()->Contains(ent)) return;
|
||||
GetFromEntity(ent);
|
||||
}
|
||||
|
||||
void IFGraph_AllShared::GetFromEntity
|
||||
(const Handle(Standard_Transient)& ent)
|
||||
{ thegraph.GetFromEntity(ent,Standard_True); } // le fait pour nous
|
||||
|
||||
void IFGraph_AllShared::GetFromIter (const Interface_EntityIterator& iter)
|
||||
void IFGraph_AllShared::GetFromIter (const Interface_EntityIterator& iter)
|
||||
{
|
||||
for (iter.Start(); iter.More(); iter.Next())
|
||||
thegraph.GetFromEntity(iter.Value(),Standard_True);
|
||||
}
|
||||
|
||||
void IFGraph_AllShared::ResetData ()
|
||||
{ Reset(); thegraph.Reset(); }
|
||||
|
||||
void IFGraph_AllShared::Evaluate()
|
||||
{ Reset(); GetFromGraph(thegraph); }
|
||||
void IFGraph_AllShared::Evaluate()
|
||||
{
|
||||
Reset();
|
||||
GetFromGraph(thegraph);
|
||||
}
|
||||
|
@@ -23,8 +23,6 @@
|
||||
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_GraphContent.hxx>
|
||||
class Interface_Graph;
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
@@ -33,13 +31,14 @@ class Interface_EntityIterator;
|
||||
//! for instance)
|
||||
class IFGraph_AllShared : public Interface_GraphContent
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates an AllShared from a graph, empty ready to be filled
|
||||
Standard_EXPORT IFGraph_AllShared(const Interface_Graph& agraph);
|
||||
IFGraph_AllShared(const Interface_Graph& agraph)
|
||||
: thegraph (agraph)
|
||||
{}
|
||||
|
||||
//! creates an AllShared which memrizes Entities shared by a given
|
||||
//! one, at any level, including itself
|
||||
@@ -47,40 +46,21 @@ public:
|
||||
|
||||
//! adds an entity and its shared ones to the list (allows to
|
||||
//! cumulate all Entities shared by some ones)
|
||||
Standard_EXPORT void GetFromEntity (const Handle(Standard_Transient)& ent);
|
||||
void GetFromEntity (const Handle(Standard_Transient)& ent) { thegraph.GetFromEntity(ent,Standard_True); }
|
||||
|
||||
//! Adds Entities from an EntityIterator and all their shared
|
||||
//! ones at any level
|
||||
Standard_EXPORT void GetFromIter (const Interface_EntityIterator& iter);
|
||||
|
||||
//! Allows to restart on a new data set
|
||||
Standard_EXPORT void ResetData();
|
||||
void ResetData() { Reset(); thegraph.Reset(); }
|
||||
|
||||
//! does the specific evaluation (shared entities atall levels)
|
||||
Standard_EXPORT virtual void Evaluate() Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Interface_Graph thegraph;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFGraph_AllShared_HeaderFile
|
||||
|
@@ -1,82 +0,0 @@
|
||||
// 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 <IFGraph_Articulations.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
// Points d'Articulation d'un Graphe : ce sont les "passages obliges" du graphe
|
||||
// Algorithme tire du Sedgewick, p 392
|
||||
IFGraph_Articulations::IFGraph_Articulations
|
||||
(const Interface_Graph& agraph, const Standard_Boolean whole)
|
||||
: thegraph (agraph)
|
||||
{ if (whole) thegraph.GetFromModel(); }
|
||||
|
||||
|
||||
void IFGraph_Articulations::GetFromEntity
|
||||
(const Handle(Standard_Transient)& ent)
|
||||
{ thegraph.GetFromEntity(ent,Standard_True); }
|
||||
|
||||
void IFGraph_Articulations::GetFromIter(const Interface_EntityIterator& iter)
|
||||
{ thegraph.GetFromIter(iter,0); }
|
||||
|
||||
|
||||
void IFGraph_Articulations::ResetData ()
|
||||
{ Reset(); thegraph.Reset(); thelist = new TColStd_HSequenceOfInteger(); }
|
||||
|
||||
void IFGraph_Articulations::Evaluate ()
|
||||
{
|
||||
// Algorithme, cf Sedgewick "Algorithms", p 392
|
||||
thelist = new TColStd_HSequenceOfInteger();
|
||||
// Utilisation de Visit
|
||||
Standard_Integer nb = thegraph.Size();
|
||||
for (Standard_Integer i = 1; i <= nb; i ++) {
|
||||
thenow = 0;
|
||||
if (thegraph.IsPresent(i)) Visit(i);
|
||||
}
|
||||
// Resultat dans thelist
|
||||
Reset();
|
||||
Standard_Integer nbres = thelist->Length();
|
||||
for (Standard_Integer ires = 1; ires <= nbres; ires ++) {
|
||||
Standard_Integer num = thelist->Value(ires);
|
||||
GetOneItem(thegraph.Model()->Value(num));
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Integer IFGraph_Articulations::Visit (const Standard_Integer num)
|
||||
{
|
||||
thenow ++;
|
||||
thegraph.SetStatus(num,thenow);
|
||||
Standard_Integer min = thenow;
|
||||
|
||||
for (Interface_EntityIterator iter = thegraph.Shareds(thegraph.Entity(num));
|
||||
iter.More(); iter.Next()) {
|
||||
Handle(Standard_Transient) ent = iter.Value();
|
||||
Standard_Integer nument = thegraph.EntityNumber(ent);
|
||||
if (!thegraph.IsPresent(num)) {
|
||||
thegraph.GetFromEntity(ent,Standard_False);
|
||||
nument = thegraph.EntityNumber(ent);
|
||||
}
|
||||
Standard_Integer statent = thegraph.Status(nument); // pas reevalue
|
||||
if (statent == 0) {
|
||||
Standard_Integer mm = Visit(nument);
|
||||
if (mm < min) min = mm;
|
||||
if (mm > thegraph.Status(num)) thelist->Append(num); // ON EN A UN : num
|
||||
}
|
||||
else if (statent < min) min = statent;
|
||||
}
|
||||
return min;
|
||||
}
|
@@ -1,94 +0,0 @@
|
||||
// Created on: 1992-09-23
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 _IFGraph_Articulations_HeaderFile
|
||||
#define _IFGraph_Articulations_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_HSequenceOfInteger.hxx>
|
||||
#include <Interface_GraphContent.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_Graph;
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
//! this class gives entities which are Articulation points
|
||||
//! in a whole Model or in a sub-part
|
||||
//! An Articulation Point divides the graph in two (or more)
|
||||
//! disconnected sub-graphs
|
||||
//! Identifying Articulation Points allows improving
|
||||
//! efficiency of spliting a set of Entities into sub-sets
|
||||
class IFGraph_Articulations : public Interface_GraphContent
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates Articulations to evaluate a Graph
|
||||
//! whole True : works on the whole Model
|
||||
//! whole False : remains empty, ready to work on a sub-part
|
||||
Standard_EXPORT IFGraph_Articulations(const Interface_Graph& agraph, const Standard_Boolean whole);
|
||||
|
||||
//! adds an entity and its shared ones to the list
|
||||
Standard_EXPORT void GetFromEntity (const Handle(Standard_Transient)& ent);
|
||||
|
||||
//! adds a list of entities (as an iterator)
|
||||
Standard_EXPORT void GetFromIter (const Interface_EntityIterator& iter);
|
||||
|
||||
//! Allows to restart on a new data set
|
||||
Standard_EXPORT void ResetData();
|
||||
|
||||
//! Evaluates the list of Articulation points
|
||||
Standard_EXPORT virtual void Evaluate() Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! basic routine of computation
|
||||
//! (see book Sedgewick "Algorithms", p 392)
|
||||
Standard_EXPORT Standard_Integer Visit (const Standard_Integer num);
|
||||
|
||||
|
||||
Interface_Graph thegraph;
|
||||
Standard_Integer thenow;
|
||||
Handle(TColStd_HSequenceOfInteger) thelist;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFGraph_Articulations_HeaderFile
|
@@ -15,64 +15,40 @@
|
||||
#include <IFGraph_AllShared.hxx>
|
||||
#include <IFGraph_Compare.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
// Comparateur de deux sous-ensembles d un Modele
|
||||
// Au premier sous-ensemble, est attribue le Status 1
|
||||
// Au deuxieme sous-ensemble, est attribue le Status 2
|
||||
// La partie commune se voit attribuer le Status 3
|
||||
IFGraph_Compare::IFGraph_Compare (const Interface_Graph& agraph)
|
||||
: thegraph (agraph) { }
|
||||
|
||||
void IFGraph_Compare::GetFromEntity
|
||||
(const Handle(Standard_Transient)& ent, const Standard_Boolean first)
|
||||
void IFGraph_Compare::GetFromEntity (const Handle(Standard_Transient)& ent, const Standard_Boolean first)
|
||||
{
|
||||
IFGraph_AllShared iter(thegraph.Model(),ent);
|
||||
GetFromIter(iter,first);
|
||||
}
|
||||
|
||||
void IFGraph_Compare::GetFromIter
|
||||
(const Interface_EntityIterator& iter, const Standard_Boolean first)
|
||||
void IFGraph_Compare::GetFromIter (const Interface_EntityIterator& iter, const Standard_Boolean first)
|
||||
{
|
||||
Standard_Integer stat = 2;
|
||||
if (first) stat = 1;
|
||||
thegraph.GetFromIter(iter,stat,3,Standard_False);
|
||||
}
|
||||
|
||||
|
||||
void IFGraph_Compare::Merge ()
|
||||
void IFGraph_Compare::Merge ()
|
||||
{
|
||||
thegraph.ChangeStatus (2,1);
|
||||
thegraph.ChangeStatus (3,1);
|
||||
}
|
||||
|
||||
void IFGraph_Compare::RemoveSecond ()
|
||||
void IFGraph_Compare::RemoveSecond ()
|
||||
{
|
||||
thegraph.ChangeStatus (3,1);
|
||||
thegraph.RemoveStatus (2);
|
||||
}
|
||||
|
||||
void IFGraph_Compare::KeepCommon ()
|
||||
void IFGraph_Compare::KeepCommon ()
|
||||
{
|
||||
thegraph.RemoveStatus (1);
|
||||
thegraph.RemoveStatus (2);
|
||||
thegraph.ChangeStatus (3,1);
|
||||
}
|
||||
|
||||
void IFGraph_Compare::ResetData ()
|
||||
{ Reset(); thegraph.Reset(); }
|
||||
|
||||
void IFGraph_Compare::Evaluate ()
|
||||
void IFGraph_Compare::Evaluate ()
|
||||
{
|
||||
Reset(); GetFromGraph(thegraph); // Evaluation deja faite par le graphe
|
||||
}
|
||||
|
||||
Interface_EntityIterator IFGraph_Compare::Common () const
|
||||
{ return Interface_GraphContent(thegraph,3); }
|
||||
|
||||
Interface_EntityIterator IFGraph_Compare::FirstOnly () const
|
||||
{ return Interface_GraphContent(thegraph,1); }
|
||||
|
||||
Interface_EntityIterator IFGraph_Compare::SecondOnly () const
|
||||
{ return Interface_GraphContent(thegraph,2); }
|
||||
|
@@ -23,9 +23,6 @@
|
||||
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_GraphContent.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_Graph;
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
@@ -36,13 +33,14 @@ class Interface_EntityIterator;
|
||||
//! Basic Iteration gives Cumulation (union)
|
||||
class IFGraph_Compare : public Interface_GraphContent
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates empty Compare, ready to work
|
||||
Standard_EXPORT IFGraph_Compare(const Interface_Graph& agraph);
|
||||
IFGraph_Compare(const Interface_Graph& agraph)
|
||||
: thegraph (agraph)
|
||||
{}
|
||||
|
||||
//! adds an entity and its shared ones to the list :
|
||||
//! first True means adds to the first sub-list, else to the 2nd
|
||||
@@ -66,42 +64,23 @@ public:
|
||||
Standard_EXPORT void KeepCommon();
|
||||
|
||||
//! Allows to restart on a new data set
|
||||
Standard_EXPORT void ResetData();
|
||||
void ResetData() { Reset(); thegraph.Reset(); }
|
||||
|
||||
//! Recomputes result of comparing to sub-parts
|
||||
Standard_EXPORT virtual void Evaluate() Standard_OVERRIDE;
|
||||
|
||||
//! returns entities common to the both parts
|
||||
Standard_EXPORT Interface_EntityIterator Common() const;
|
||||
Interface_EntityIterator Common() const { return Interface_GraphContent(thegraph,3); }
|
||||
|
||||
//! returns entities which are exclusively in the first list
|
||||
Standard_EXPORT Interface_EntityIterator FirstOnly() const;
|
||||
Interface_EntityIterator FirstOnly() const { return Interface_GraphContent(thegraph,1); }
|
||||
|
||||
//! returns entities which are exclusively in the second part
|
||||
Standard_EXPORT Interface_EntityIterator SecondOnly() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Interface_EntityIterator SecondOnly() const { return Interface_GraphContent(thegraph,2); }
|
||||
|
||||
private:
|
||||
|
||||
Interface_Graph thegraph;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFGraph_Compare_HeaderFile
|
||||
|
@@ -23,11 +23,8 @@
|
||||
// On recommence jusqu'a ce qu'il n'y ait plus de Vertex libre
|
||||
// Honnetement, si ca ne marche pas, cf classe ConnectedVerticesIterator
|
||||
// de GraphTools qui fait en principe la meme chose
|
||||
IFGraph_ConnectedComponants::IFGraph_ConnectedComponants
|
||||
(const Interface_Graph& agraph, const Standard_Boolean whole)
|
||||
: IFGraph_SubPartsIterator (agraph, whole) { }
|
||||
|
||||
void IFGraph_ConnectedComponants::Evaluate()
|
||||
void IFGraph_ConnectedComponants::Evaluate()
|
||||
{
|
||||
// On part des "loaded"
|
||||
// Pour chacun : s il est note dans le graphe, on passe
|
||||
|
@@ -22,10 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <IFGraph_SubPartsIterator.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_Graph;
|
||||
|
||||
|
||||
//! determines Connected Componants in a Graph. They define
|
||||
//! disjoined sets of Entities
|
||||
class IFGraph_ConnectedComponants : public IFGraph_SubPartsIterator
|
||||
@@ -34,36 +32,15 @@ public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates with a Graph, and will analyse :
|
||||
//! whole True : all the contents of the Model
|
||||
//! whole False : sub-parts which will be given later
|
||||
Standard_EXPORT IFGraph_ConnectedComponants(const Interface_Graph& agraph, const Standard_Boolean whole);
|
||||
IFGraph_ConnectedComponants(const Interface_Graph& agraph, const Standard_Boolean whole)
|
||||
: IFGraph_SubPartsIterator (agraph, whole)
|
||||
{}
|
||||
|
||||
//! does the computation
|
||||
Standard_EXPORT virtual void Evaluate() Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFGraph_ConnectedComponants_HeaderFile
|
||||
|
@@ -26,31 +26,25 @@
|
||||
// Les status demarrent a 2, ainsi a l ajout d une entite, on distingue bien
|
||||
// entre les entites nouvelles, liees a cet appel (statut temporaire 1) et les
|
||||
// autres (statut superieur ou egal a 2)
|
||||
IFGraph_Cumulate::IFGraph_Cumulate (const Interface_Graph& agraph)
|
||||
: thegraph (agraph) { }
|
||||
|
||||
void IFGraph_Cumulate::GetFromEntity
|
||||
(const Handle(Standard_Transient)& ent)
|
||||
void IFGraph_Cumulate::GetFromEntity (const Handle(Standard_Transient)& ent)
|
||||
{
|
||||
IFGraph_AllShared iter(thegraph.Model(),ent);
|
||||
GetFromIter (iter);
|
||||
}
|
||||
|
||||
void IFGraph_Cumulate::ResetData ()
|
||||
{ Reset(); thegraph.Reset(); }
|
||||
|
||||
void IFGraph_Cumulate::GetFromIter (const Interface_EntityIterator& iter)
|
||||
void IFGraph_Cumulate::GetFromIter (const Interface_EntityIterator& iter)
|
||||
{
|
||||
thegraph.GetFromIter(iter,1,1,Standard_True);
|
||||
thegraph.ChangeStatus (1,2); // une fois le calcul fait
|
||||
}
|
||||
|
||||
void IFGraph_Cumulate::Evaluate ()
|
||||
void IFGraph_Cumulate::Evaluate ()
|
||||
{
|
||||
Reset(); GetFromGraph(thegraph); // evaluation deja faite dans le graphe
|
||||
}
|
||||
|
||||
Interface_EntityIterator IFGraph_Cumulate::Overlapped () const
|
||||
Interface_EntityIterator IFGraph_Cumulate::Overlapped () const
|
||||
{
|
||||
Interface_EntityIterator iter;
|
||||
Standard_Integer nb = thegraph.Size();
|
||||
@@ -61,7 +55,7 @@ IFGraph_Cumulate::IFGraph_Cumulate (const Interface_Graph& agraph)
|
||||
return iter;
|
||||
}
|
||||
|
||||
Interface_EntityIterator IFGraph_Cumulate::Forgotten () const
|
||||
Interface_EntityIterator IFGraph_Cumulate::Forgotten () const
|
||||
{
|
||||
Interface_EntityIterator iter;
|
||||
Standard_Integer nb = thegraph.Size();
|
||||
@@ -72,8 +66,7 @@ IFGraph_Cumulate::IFGraph_Cumulate (const Interface_Graph& agraph)
|
||||
return iter;
|
||||
}
|
||||
|
||||
Interface_EntityIterator IFGraph_Cumulate::PerCount
|
||||
(const Standard_Integer count) const
|
||||
Interface_EntityIterator IFGraph_Cumulate::PerCount (const Standard_Integer count) const
|
||||
{
|
||||
Interface_EntityIterator iter;
|
||||
Standard_Integer nb = thegraph.Size();
|
||||
@@ -84,9 +77,7 @@ IFGraph_Cumulate::IFGraph_Cumulate (const Interface_Graph& agraph)
|
||||
return iter;
|
||||
}
|
||||
|
||||
|
||||
Standard_Integer IFGraph_Cumulate::NbTimes
|
||||
(const Handle(Standard_Transient)& ent) const
|
||||
Standard_Integer IFGraph_Cumulate::NbTimes (const Handle(Standard_Transient)& ent) const
|
||||
{
|
||||
Standard_Integer num = thegraph.EntityNumber(ent);
|
||||
if (num == 0) return 0;
|
||||
@@ -94,7 +85,7 @@ IFGraph_Cumulate::IFGraph_Cumulate (const Interface_Graph& agraph)
|
||||
return stat-1;
|
||||
}
|
||||
|
||||
Standard_Integer IFGraph_Cumulate::HighestNbTimes () const
|
||||
Standard_Integer IFGraph_Cumulate::HighestNbTimes () const
|
||||
{
|
||||
Standard_Integer max = 0;
|
||||
Standard_Integer nb = thegraph.Size();
|
||||
|
@@ -23,9 +23,6 @@
|
||||
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_GraphContent.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Interface_Graph;
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
@@ -35,13 +32,14 @@ class Interface_EntityIterator;
|
||||
//! Basic Iteration gives entities which are part of Cumulation
|
||||
class IFGraph_Cumulate : public Interface_GraphContent
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates empty Cumulate, ready to work
|
||||
Standard_EXPORT IFGraph_Cumulate(const Interface_Graph& agraph);
|
||||
IFGraph_Cumulate(const Interface_Graph& agraph)
|
||||
: thegraph (agraph)
|
||||
{}
|
||||
|
||||
//! adds an entity and its shared ones to the list
|
||||
Standard_EXPORT void GetFromEntity (const Handle(Standard_Transient)& ent);
|
||||
@@ -51,7 +49,7 @@ public:
|
||||
Standard_EXPORT void GetFromIter (const Interface_EntityIterator& iter);
|
||||
|
||||
//! Allows to restart on a new data set
|
||||
Standard_EXPORT void ResetData();
|
||||
void ResetData() { Reset(); thegraph.Reset(); }
|
||||
|
||||
//! Evaluates the result of cumulation
|
||||
Standard_EXPORT virtual void Evaluate() Standard_OVERRIDE;
|
||||
@@ -74,28 +72,9 @@ public:
|
||||
//! (0 means empty, 1 means no overlap)
|
||||
Standard_EXPORT Standard_Integer HighestNbTimes() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Interface_Graph thegraph;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFGraph_Cumulate_HeaderFile
|
||||
|
@@ -23,24 +23,8 @@
|
||||
// Les status :
|
||||
// - Les entites de depart sont au Status 0
|
||||
// - Les entites Sharing NOUVELLES (ExternalSources) sont au Status 1
|
||||
IFGraph_ExternalSources::IFGraph_ExternalSources
|
||||
(const Interface_Graph& agraph)
|
||||
: thegraph (agraph) { }
|
||||
|
||||
|
||||
void IFGraph_ExternalSources::GetFromEntity
|
||||
(const Handle(Standard_Transient)& ent)
|
||||
{ thegraph.GetFromEntity(ent,Standard_True); }
|
||||
|
||||
void IFGraph_ExternalSources::GetFromIter
|
||||
(const Interface_EntityIterator& iter)
|
||||
{ thegraph.GetFromIter(iter,0); }
|
||||
|
||||
void IFGraph_ExternalSources::ResetData ()
|
||||
{ Reset(); thegraph.Reset(); }
|
||||
|
||||
|
||||
void IFGraph_ExternalSources::Evaluate ()
|
||||
void IFGraph_ExternalSources::Evaluate ()
|
||||
{
|
||||
Reset();
|
||||
thegraph.RemoveStatus(1);
|
||||
@@ -52,7 +36,7 @@ IFGraph_ExternalSources::IFGraph_ExternalSources
|
||||
GetFromGraph(thegraph,1);
|
||||
}
|
||||
|
||||
Standard_Boolean IFGraph_ExternalSources::IsEmpty ()
|
||||
Standard_Boolean IFGraph_ExternalSources::IsEmpty ()
|
||||
{
|
||||
Evaluate();
|
||||
Standard_Integer nb = thegraph.Size();
|
||||
|
@@ -23,9 +23,6 @@
|
||||
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_GraphContent.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_Graph;
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
@@ -33,22 +30,25 @@ class Interface_EntityIterator;
|
||||
//! a sub-part, but are not contained by this sub-part
|
||||
class IFGraph_ExternalSources : public Interface_GraphContent
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates empty ExternalSources, ready to work
|
||||
Standard_EXPORT IFGraph_ExternalSources(const Interface_Graph& agraph);
|
||||
IFGraph_ExternalSources(const Interface_Graph& agraph)
|
||||
: thegraph (agraph)
|
||||
{}
|
||||
|
||||
//! adds an entity and its shared ones to the list
|
||||
Standard_EXPORT void GetFromEntity (const Handle(Standard_Transient)& ent);
|
||||
void GetFromEntity (const Handle(Standard_Transient)& ent)
|
||||
{ thegraph.GetFromEntity(ent,Standard_True); }
|
||||
|
||||
//! adds a list of entities (as an iterator) with shared ones
|
||||
Standard_EXPORT void GetFromIter (const Interface_EntityIterator& iter);
|
||||
void GetFromIter (const Interface_EntityIterator& iter)
|
||||
{ thegraph.GetFromIter(iter,0); }
|
||||
|
||||
//! Allows to restart on a new data set
|
||||
Standard_EXPORT void ResetData();
|
||||
void ResetData() { Reset(); thegraph.Reset(); }
|
||||
|
||||
//! Evaluates external sources of a set of entities
|
||||
Standard_EXPORT virtual void Evaluate() Standard_OVERRIDE;
|
||||
@@ -58,28 +58,9 @@ public:
|
||||
//! (performs an Evaluation as necessary)
|
||||
Standard_EXPORT Standard_Boolean IsEmpty();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Interface_Graph thegraph;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFGraph_ExternalSources_HeaderFile
|
||||
|
@@ -14,28 +14,17 @@
|
||||
|
||||
#include <IFGraph_ExternalSources.hxx>
|
||||
#include <IFGraph_SCRoots.hxx>
|
||||
#include <IFGraph_StrongComponants.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
//#include <Interface_GraphContent.hxx>
|
||||
IFGraph_SCRoots::IFGraph_SCRoots
|
||||
(const Interface_Graph& agraph, const Standard_Boolean whole)
|
||||
: IFGraph_StrongComponants (agraph,whole) { }
|
||||
|
||||
IFGraph_SCRoots::IFGraph_SCRoots (IFGraph_StrongComponants& subparts)
|
||||
: IFGraph_StrongComponants (subparts) { }
|
||||
|
||||
// StrongComponants racines d un ensemble donne
|
||||
// On ne tient pas compte du reste eventuel (c est un autre probleme)
|
||||
// On part du fait que StrongComponants donne les Composants dans l ordre de
|
||||
// dependance, le premier ne dependant de rien (les autres, on ne sait pas ...)
|
||||
|
||||
void IFGraph_SCRoots::Evaluate ()
|
||||
void IFGraph_SCRoots::Evaluate ()
|
||||
{
|
||||
IFGraph_StrongComponants complist (Model(),Standard_False);
|
||||
complist.GetFromIter(Loaded());
|
||||
// Interface_Graph G(Model());
|
||||
Interface_Graph G(thegraph);
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" SCRoots:"<<endl;
|
||||
@@ -55,15 +44,3 @@ IFGraph_SCRoots::IFGraph_SCRoots
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ce qui suit, c etait autre chose : les SC qui n ont pas d ExternalSource
|
||||
Interface_EntityIterator list = complist.Entities();
|
||||
IFGraph_ExternalSources eval (Model());
|
||||
eval.GetFromIter(list);
|
||||
if (eval.IsEmpty()) {
|
||||
AddPart();
|
||||
GetFromIter(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@@ -22,9 +22,7 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <IFGraph_StrongComponants.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_Graph;
|
||||
class IFGraph_StrongComponants;
|
||||
|
||||
|
||||
//! determines strong componants in a graph which are Roots
|
||||
@@ -38,35 +36,17 @@ public:
|
||||
//! creates with a Graph, and will analyse :
|
||||
//! whole True : all the contents of the Model
|
||||
//! whole False : sub-parts which will be given later
|
||||
Standard_EXPORT IFGraph_SCRoots(const Interface_Graph& agraph, const Standard_Boolean whole);
|
||||
IFGraph_SCRoots(const Interface_Graph& agraph, const Standard_Boolean whole)
|
||||
: IFGraph_StrongComponants (agraph,whole)
|
||||
{}
|
||||
|
||||
//! creates from a StrongComponants which was already computed
|
||||
Standard_EXPORT IFGraph_SCRoots(IFGraph_StrongComponants& subparts);
|
||||
IFGraph_SCRoots(IFGraph_StrongComponants& subparts)
|
||||
: IFGraph_StrongComponants (subparts)
|
||||
{}
|
||||
|
||||
//! does the computation
|
||||
Standard_EXPORT virtual void Evaluate() Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFGraph_SCRoots_HeaderFile
|
||||
|
@@ -16,15 +16,9 @@
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_GraphContent.hxx>
|
||||
|
||||
//#include <IFGraph_SortedStrongs.hxx>
|
||||
IFGraph_StrongComponants::IFGraph_StrongComponants
|
||||
(const Interface_Graph& agraph, const Standard_Boolean whole)
|
||||
: IFGraph_SubPartsIterator (agraph, whole) { }
|
||||
|
||||
void IFGraph_StrongComponants::Evaluate ()
|
||||
void IFGraph_StrongComponants::Evaluate ()
|
||||
{
|
||||
Interface_GraphContent iter = Loaded();
|
||||
Interface_Graph G(thegraph); G.GetFromIter(iter,0);
|
||||
Interface_Graph G(thegraph); G.GetFromIter(Loaded(),0);
|
||||
Standard_Integer nb = G.Size();
|
||||
for (Standard_Integer i = 1; i <= nb; i ++) {
|
||||
if (!G.IsPresent(i)) continue;
|
||||
|
@@ -22,7 +22,6 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <IFGraph_SubPartsIterator.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_Graph;
|
||||
|
||||
|
||||
@@ -30,40 +29,19 @@ class Interface_Graph;
|
||||
//! isolated entities (single componants) or loops
|
||||
class IFGraph_StrongComponants : public IFGraph_SubPartsIterator
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! creates with a Graph, and will analyse :
|
||||
//! whole True : all the contents of the Model
|
||||
//! whole False : sub-parts which will be given later
|
||||
Standard_EXPORT IFGraph_StrongComponants(const Interface_Graph& agraph, const Standard_Boolean whole);
|
||||
IFGraph_StrongComponants(const Interface_Graph& agraph, const Standard_Boolean whole)
|
||||
: IFGraph_SubPartsIterator (agraph, whole)
|
||||
{}
|
||||
|
||||
//! does the computation
|
||||
Standard_EXPORT virtual void Evaluate() Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFGraph_StrongComponants_HeaderFile
|
||||
|
@@ -26,9 +26,8 @@
|
||||
// SubPartsIterator permet de regrouper les entites en plusieurs sous-parties
|
||||
// A chaque sous-partie est attache un Status : la 1re a 1, la 2e a 2, etc...
|
||||
// (consequence, les sous-parties sont necessairement disjointes)
|
||||
IFGraph_SubPartsIterator::IFGraph_SubPartsIterator
|
||||
(const Interface_Graph& agraph, const Standard_Boolean whole)
|
||||
: thegraph (agraph)
|
||||
IFGraph_SubPartsIterator::IFGraph_SubPartsIterator (const Interface_Graph& agraph, const Standard_Boolean whole)
|
||||
: thegraph (agraph)
|
||||
{
|
||||
if (whole) thegraph.GetFromModel();
|
||||
theparts = new TColStd_HSequenceOfInteger();
|
||||
@@ -37,9 +36,8 @@ IFGraph_SubPartsIterator::IFGraph_SubPartsIterator
|
||||
thecurr = 0;
|
||||
}
|
||||
|
||||
IFGraph_SubPartsIterator::IFGraph_SubPartsIterator
|
||||
(IFGraph_SubPartsIterator& other)
|
||||
: thegraph (other.Graph())
|
||||
IFGraph_SubPartsIterator::IFGraph_SubPartsIterator (IFGraph_SubPartsIterator& other)
|
||||
: thegraph (other.thegraph)
|
||||
{
|
||||
Standard_Integer nb = thegraph.Size();
|
||||
theparts = new TColStd_HSequenceOfInteger();
|
||||
@@ -57,8 +55,7 @@ IFGraph_SubPartsIterator::IFGraph_SubPartsIterator
|
||||
thecurr = 1;
|
||||
}
|
||||
|
||||
void IFGraph_SubPartsIterator::GetParts
|
||||
(IFGraph_SubPartsIterator& other)
|
||||
void IFGraph_SubPartsIterator::GetParts (IFGraph_SubPartsIterator& other)
|
||||
{
|
||||
if (Model() != other.Model()) Interface_InterfaceError::Raise
|
||||
("SubPartsIterator : GetParts");
|
||||
@@ -77,48 +74,44 @@ IFGraph_SubPartsIterator::IFGraph_SubPartsIterator
|
||||
}
|
||||
}
|
||||
|
||||
const Interface_Graph& IFGraph_SubPartsIterator::Graph () const
|
||||
{ return thegraph; }
|
||||
|
||||
// .... Gestion Interne (remplissage, etc...) .... //
|
||||
|
||||
Handle(Interface_InterfaceModel) IFGraph_SubPartsIterator::Model() const
|
||||
{ return thegraph.Model(); }
|
||||
Handle(Interface_InterfaceModel) IFGraph_SubPartsIterator::Model() const
|
||||
{ return thegraph.Model(); }
|
||||
|
||||
void IFGraph_SubPartsIterator::AddPart ()
|
||||
void IFGraph_SubPartsIterator::AddPart ()
|
||||
{
|
||||
theparts->Append( Standard_Integer(0) );
|
||||
thepart = theparts->Length();
|
||||
}
|
||||
|
||||
Standard_Integer IFGraph_SubPartsIterator::NbParts () const
|
||||
{ return theparts->Length(); }
|
||||
Standard_Integer IFGraph_SubPartsIterator::NbParts () const
|
||||
{ return theparts->Length(); }
|
||||
|
||||
Standard_Integer IFGraph_SubPartsIterator::PartNum () const
|
||||
{ return thepart; }
|
||||
Standard_Integer IFGraph_SubPartsIterator::PartNum () const
|
||||
{ return thepart; }
|
||||
|
||||
void IFGraph_SubPartsIterator::SetLoad ()
|
||||
{ thepart = 0; }
|
||||
void IFGraph_SubPartsIterator::SetLoad ()
|
||||
{ thepart = 0; }
|
||||
|
||||
void IFGraph_SubPartsIterator::SetPartNum (const Standard_Integer num)
|
||||
void IFGraph_SubPartsIterator::SetPartNum (const Standard_Integer num)
|
||||
{
|
||||
if (num <= 0 || num > theparts->Length()) Standard_OutOfRange::Raise
|
||||
("IFGraph_SubPartsIterator : SetPartNum");
|
||||
thepart = num;
|
||||
}
|
||||
|
||||
void IFGraph_SubPartsIterator::GetFromEntity
|
||||
(const Handle(Standard_Transient)& ent, const Standard_Boolean shared)
|
||||
void IFGraph_SubPartsIterator::GetFromEntity (const Handle(Standard_Transient)& ent, const Standard_Boolean shared)
|
||||
{
|
||||
thegraph.GetFromEntity(ent,shared, thepart,thepart,Standard_False);
|
||||
}
|
||||
|
||||
void IFGraph_SubPartsIterator::GetFromIter (const Interface_EntityIterator& iter)
|
||||
void IFGraph_SubPartsIterator::GetFromIter (const Interface_EntityIterator& iter)
|
||||
{
|
||||
thegraph.GetFromIter(iter, thepart,thepart, Standard_False);
|
||||
}
|
||||
|
||||
void IFGraph_SubPartsIterator::Reset ()
|
||||
void IFGraph_SubPartsIterator::Reset ()
|
||||
{
|
||||
thegraph.Reset();
|
||||
theparts->Clear();
|
||||
@@ -251,11 +244,3 @@ IFGraph_SubPartsIterator::IFGraph_SubPartsIterator
|
||||
}
|
||||
return iter;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ~IFGraph_SubPartsIterator
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
IFGraph_SubPartsIterator::~IFGraph_SubPartsIterator()
|
||||
{}
|
||||
|
@@ -23,14 +23,8 @@
|
||||
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <TColStd_HSequenceOfInteger.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Interface_InterfaceError;
|
||||
class Interface_Graph;
|
||||
class TColStd_HSequenceOfTransient;
|
||||
class Interface_InterfaceModel;
|
||||
class Standard_Transient;
|
||||
class Interface_EntityIterator;
|
||||
class Interface_GraphContent;
|
||||
|
||||
@@ -82,8 +76,8 @@ public:
|
||||
//! (0 at load time)
|
||||
Standard_EXPORT Standard_Integer PartNum() const;
|
||||
|
||||
//! Sets SubPartIterator to get Entities (by GetFromEntity &
|
||||
//! GetFromIter) into load status, to be analysed later
|
||||
//! Sets SubPartIterator to get Entities (by GetFromEntity & GetFromIter)
|
||||
//! into load status, to be analysed later
|
||||
Standard_EXPORT void SetLoad();
|
||||
|
||||
//! Sets numero of receiving part to a new value
|
||||
@@ -150,35 +144,18 @@ public:
|
||||
//! Error : same as above (end of iteration)
|
||||
Standard_EXPORT Interface_EntityIterator Entities() const;
|
||||
|
||||
Standard_EXPORT virtual ~IFGraph_SubPartsIterator();
|
||||
|
||||
protected:
|
||||
|
||||
Standard_EXPORT virtual ~IFGraph_SubPartsIterator() {}
|
||||
|
||||
protected:
|
||||
|
||||
Interface_Graph thegraph;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Returns the Graph used by <me>. Used to create another
|
||||
//! SubPartsIterator from <me>
|
||||
Standard_EXPORT const Interface_Graph& Graph() const;
|
||||
|
||||
private:
|
||||
|
||||
Handle(TColStd_HSequenceOfInteger) theparts;
|
||||
Handle(TColStd_HSequenceOfInteger) thefirsts;
|
||||
Standard_Integer thepart;
|
||||
Standard_Integer thecurr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFGraph_SubPartsIterator_HeaderFile
|
||||
|
@@ -1,8 +1,3 @@
|
||||
IFSelect.cxx
|
||||
IFSelect.hxx
|
||||
IFSelect_Act.cxx
|
||||
IFSelect_Act.hxx
|
||||
IFSelect_ActFunc.hxx
|
||||
IFSelect_Activator.cxx
|
||||
IFSelect_Activator.hxx
|
||||
IFSelect_AppliedModifiers.cxx
|
||||
@@ -32,9 +27,6 @@ IFSelect_EditForm.hxx
|
||||
IFSelect_Editor.cxx
|
||||
IFSelect_Editor.hxx
|
||||
IFSelect_EditValue.hxx
|
||||
IFSelect_FileModifier.gxx
|
||||
IFSelect_Functions.cxx
|
||||
IFSelect_Functions.hxx
|
||||
IFSelect_GeneralModifier.cxx
|
||||
IFSelect_GeneralModifier.hxx
|
||||
IFSelect_GraphCounter.cxx
|
||||
|
@@ -1,33 +0,0 @@
|
||||
// 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 <IFSelect.hxx>
|
||||
#include <IFSelect_SessionFile.hxx>
|
||||
#include <IFSelect_WorkSession.hxx>
|
||||
|
||||
// Methodes de confort, evitant de devoir connaitre SessionFile, qui est un
|
||||
// Tool non destine a l export (en particulier, pas un Handle)
|
||||
Standard_Boolean IFSelect::SaveSession
|
||||
(const Handle(IFSelect_WorkSession)& WS, const Standard_CString file)
|
||||
{
|
||||
IFSelect_SessionFile sesfile(WS,file);
|
||||
return sesfile.IsDone();
|
||||
}
|
||||
|
||||
Standard_Boolean IFSelect::RestoreSession
|
||||
(const Handle(IFSelect_WorkSession)& WS, const Standard_CString file)
|
||||
{
|
||||
IFSelect_SessionFile sesfile(WS);
|
||||
return (sesfile.Read(file) == 0);
|
||||
}
|
@@ -1,238 +0,0 @@
|
||||
// Created on: 1992-09-21
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-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 _IFSelect_HeaderFile
|
||||
#define _IFSelect_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class IFSelect_WorkSession;
|
||||
class IFSelect_Signature;
|
||||
class IFSelect_SignMultiple;
|
||||
class IFSelect_SignType;
|
||||
class IFSelect_SignCategory;
|
||||
class IFSelect_SignValidity;
|
||||
class IFSelect_SignAncestor;
|
||||
class IFSelect_ShareOut;
|
||||
class IFSelect_AppliedModifiers;
|
||||
class IFSelect_ShareOutResult;
|
||||
class IFSelect_PacketList;
|
||||
class IFSelect_Dispatch;
|
||||
class IFSelect_DispGlobal;
|
||||
class IFSelect_DispPerOne;
|
||||
class IFSelect_DispPerCount;
|
||||
class IFSelect_DispPerSignature;
|
||||
class IFSelect_DispPerFiles;
|
||||
class IFSelect_SelectionIterator;
|
||||
class IFSelect_Selection;
|
||||
class IFSelect_SelectBase;
|
||||
class IFSelect_SelectModelRoots;
|
||||
class IFSelect_SelectModelEntities;
|
||||
class IFSelect_SelectEntityNumber;
|
||||
class IFSelect_SelectPointed;
|
||||
class IFSelect_SelectCombine;
|
||||
class IFSelect_SelectUnion;
|
||||
class IFSelect_SelectIntersection;
|
||||
class IFSelect_SelectControl;
|
||||
class IFSelect_SelectDiff;
|
||||
class IFSelect_SelectDeduct;
|
||||
class IFSelect_SelectShared;
|
||||
class IFSelect_SelectSharing;
|
||||
class IFSelect_SelectAnyList;
|
||||
class IFSelect_SelectInList;
|
||||
class IFSelect_SelectSuite;
|
||||
class IFSelect_SelectExtract;
|
||||
class IFSelect_SelectUnknownEntities;
|
||||
class IFSelect_SelectErrorEntities;
|
||||
class IFSelect_SelectIncorrectEntities;
|
||||
class IFSelect_SelectRoots;
|
||||
class IFSelect_SelectRootComps;
|
||||
class IFSelect_SelectRange;
|
||||
class IFSelect_SelectAnyType;
|
||||
class IFSelect_SelectType;
|
||||
class IFSelect_SelectSignature;
|
||||
class IFSelect_SelectFlag;
|
||||
class IFSelect_SelectSent;
|
||||
class IFSelect_SelectExplore;
|
||||
class IFSelect_SelectSignedShared;
|
||||
class IFSelect_SelectSignedSharing;
|
||||
class IFSelect_IntParam;
|
||||
class IFSelect_SignatureList;
|
||||
class IFSelect_CheckCounter;
|
||||
class IFSelect_SignCounter;
|
||||
class IFSelect_GraphCounter;
|
||||
class IFSelect_Editor;
|
||||
class IFSelect_ParamEditor;
|
||||
class IFSelect_EditForm;
|
||||
class IFSelect_ListEditor;
|
||||
class IFSelect_ContextModif;
|
||||
class IFSelect_ContextWrite;
|
||||
class IFSelect_Transformer;
|
||||
class IFSelect_TransformStandard;
|
||||
class IFSelect_ModelCopier;
|
||||
class IFSelect_GeneralModifier;
|
||||
class IFSelect_Modifier;
|
||||
class IFSelect_ModifReorder;
|
||||
class IFSelect_ModifEditForm;
|
||||
class IFSelect_FileModifier;
|
||||
class IFSelect_ModelModifier;
|
||||
class IFSelect_WorkSession;
|
||||
class IFSelect_WorkLibrary;
|
||||
class IFSelect_SessionFile;
|
||||
class IFSelect_SessionDumper;
|
||||
class IFSelect_BasicDumper;
|
||||
class IFSelect_Activator;
|
||||
class IFSelect_SessionPilot;
|
||||
class IFSelect_Act;
|
||||
class IFSelect_Functions;
|
||||
|
||||
|
||||
//! Gives tools to manage Selecting a group of Entities
|
||||
//! processed by an Interface, for instance to divide up an
|
||||
//! original Model (from a File) to several smaller ones
|
||||
//! They use description of an Interface Model as a graph
|
||||
//!
|
||||
//! Remark that this corresponds to the description of a
|
||||
//! "scenario" of sharing out a File. Parts of this Scenario
|
||||
//! are intended to be permanently stored. IFSelect provides
|
||||
//! the Transient, active counterparts (to run the Scenario).
|
||||
//! But a permanent one (either as Persistent Objects or as
|
||||
//! interpretable Text) must be provided elsewhere.
|
||||
class IFSelect
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Saves the state of a WorkSession from IFSelect, by using a
|
||||
//! SessionFile from IFSelect. Returns True if Done, False in
|
||||
//! case of Error on Writing. <file> gives the name of the File
|
||||
//! to be produced (this avoids to export the class SessionFile).
|
||||
Standard_EXPORT static Standard_Boolean SaveSession (const Handle(IFSelect_WorkSession)& WS, const Standard_CString file);
|
||||
|
||||
//! Restore the state of a WorkSession from IFSelect, by using a
|
||||
//! SessionFile from IFSelect. Returns True if Done, False in
|
||||
//! case of Error on Writing. <file> gives the name of the File
|
||||
//! to be used (this avoids to export the class SessionFile).
|
||||
Standard_EXPORT static Standard_Boolean RestoreSession (const Handle(IFSelect_WorkSession)& WS, const Standard_CString file);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class IFSelect_Signature;
|
||||
friend class IFSelect_SignMultiple;
|
||||
friend class IFSelect_SignType;
|
||||
friend class IFSelect_SignCategory;
|
||||
friend class IFSelect_SignValidity;
|
||||
friend class IFSelect_SignAncestor;
|
||||
friend class IFSelect_ShareOut;
|
||||
friend class IFSelect_AppliedModifiers;
|
||||
friend class IFSelect_ShareOutResult;
|
||||
friend class IFSelect_PacketList;
|
||||
friend class IFSelect_Dispatch;
|
||||
friend class IFSelect_DispGlobal;
|
||||
friend class IFSelect_DispPerOne;
|
||||
friend class IFSelect_DispPerCount;
|
||||
friend class IFSelect_DispPerSignature;
|
||||
friend class IFSelect_DispPerFiles;
|
||||
friend class IFSelect_SelectionIterator;
|
||||
friend class IFSelect_Selection;
|
||||
friend class IFSelect_SelectBase;
|
||||
friend class IFSelect_SelectModelRoots;
|
||||
friend class IFSelect_SelectModelEntities;
|
||||
friend class IFSelect_SelectEntityNumber;
|
||||
friend class IFSelect_SelectPointed;
|
||||
friend class IFSelect_SelectCombine;
|
||||
friend class IFSelect_SelectUnion;
|
||||
friend class IFSelect_SelectIntersection;
|
||||
friend class IFSelect_SelectControl;
|
||||
friend class IFSelect_SelectDiff;
|
||||
friend class IFSelect_SelectDeduct;
|
||||
friend class IFSelect_SelectShared;
|
||||
friend class IFSelect_SelectSharing;
|
||||
friend class IFSelect_SelectAnyList;
|
||||
friend class IFSelect_SelectInList;
|
||||
friend class IFSelect_SelectSuite;
|
||||
friend class IFSelect_SelectExtract;
|
||||
friend class IFSelect_SelectUnknownEntities;
|
||||
friend class IFSelect_SelectErrorEntities;
|
||||
friend class IFSelect_SelectIncorrectEntities;
|
||||
friend class IFSelect_SelectRoots;
|
||||
friend class IFSelect_SelectRootComps;
|
||||
friend class IFSelect_SelectRange;
|
||||
friend class IFSelect_SelectAnyType;
|
||||
friend class IFSelect_SelectType;
|
||||
friend class IFSelect_SelectSignature;
|
||||
friend class IFSelect_SelectFlag;
|
||||
friend class IFSelect_SelectSent;
|
||||
friend class IFSelect_SelectExplore;
|
||||
friend class IFSelect_SelectSignedShared;
|
||||
friend class IFSelect_SelectSignedSharing;
|
||||
friend class IFSelect_IntParam;
|
||||
friend class IFSelect_SignatureList;
|
||||
friend class IFSelect_CheckCounter;
|
||||
friend class IFSelect_SignCounter;
|
||||
friend class IFSelect_GraphCounter;
|
||||
friend class IFSelect_Editor;
|
||||
friend class IFSelect_ParamEditor;
|
||||
friend class IFSelect_EditForm;
|
||||
friend class IFSelect_ListEditor;
|
||||
friend class IFSelect_ContextModif;
|
||||
friend class IFSelect_ContextWrite;
|
||||
friend class IFSelect_Transformer;
|
||||
friend class IFSelect_TransformStandard;
|
||||
friend class IFSelect_ModelCopier;
|
||||
friend class IFSelect_GeneralModifier;
|
||||
friend class IFSelect_Modifier;
|
||||
friend class IFSelect_ModifReorder;
|
||||
friend class IFSelect_ModifEditForm;
|
||||
friend class IFSelect_FileModifier;
|
||||
friend class IFSelect_ModelModifier;
|
||||
friend class IFSelect_WorkSession;
|
||||
friend class IFSelect_WorkLibrary;
|
||||
friend class IFSelect_SessionFile;
|
||||
friend class IFSelect_SessionDumper;
|
||||
friend class IFSelect_BasicDumper;
|
||||
friend class IFSelect_Activator;
|
||||
friend class IFSelect_SessionPilot;
|
||||
friend class IFSelect_Act;
|
||||
friend class IFSelect_Functions;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFSelect_HeaderFile
|
@@ -1,65 +0,0 @@
|
||||
// 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 <IFSelect_Act.hxx>
|
||||
#include <IFSelect_SessionPilot.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_Act,IFSelect_Activator)
|
||||
|
||||
static TCollection_AsciiString thedefgr, thedefil;
|
||||
|
||||
|
||||
|
||||
IFSelect_Act::IFSelect_Act
|
||||
(const Standard_CString name, const Standard_CString help,
|
||||
const IFSelect_ActFunc func)
|
||||
: thename (name) , thehelp (help) , thefunc (func) { }
|
||||
|
||||
IFSelect_ReturnStatus IFSelect_Act::Do
|
||||
(const Standard_Integer, const Handle(IFSelect_SessionPilot)& pilot)
|
||||
{
|
||||
if (!thefunc) return IFSelect_RetVoid;
|
||||
return thefunc (pilot);
|
||||
}
|
||||
|
||||
Standard_CString IFSelect_Act::Help (const Standard_Integer) const
|
||||
{ return thehelp.ToCString(); }
|
||||
|
||||
|
||||
void IFSelect_Act::SetGroup
|
||||
(const Standard_CString group, const Standard_CString file)
|
||||
{ thedefgr.Clear(); if (group[0] != '\0') thedefgr.AssignCat(group);
|
||||
thedefil.Clear(); if (file [0] != '\0') thedefil.AssignCat(file); }
|
||||
|
||||
void IFSelect_Act::AddFunc
|
||||
(const Standard_CString name, const Standard_CString help,
|
||||
const IFSelect_ActFunc func)
|
||||
{
|
||||
Handle(IFSelect_Act) act = new IFSelect_Act (name,help,func);
|
||||
if (thedefgr.Length() > 0) act->SetForGroup (thedefgr.ToCString());
|
||||
act->Add (1,name);
|
||||
}
|
||||
|
||||
void IFSelect_Act::AddFSet
|
||||
(const Standard_CString name, const Standard_CString help,
|
||||
const IFSelect_ActFunc func)
|
||||
{
|
||||
Handle(IFSelect_Act) act = new IFSelect_Act (name,help,func);
|
||||
if (thedefgr.Length() > 0)
|
||||
act->SetForGroup (thedefgr.ToCString(),thedefil.ToCString());
|
||||
act->AddSet (1,name);
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
// Created on: 2000-02-29
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 2000-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 _IFSelect_ActFunc_HeaderFile
|
||||
#define _IFSelect_ActFunc_HeaderFile
|
||||
|
||||
#include <IFSelect_SessionPilot.hxx>
|
||||
#include <IFSelect_ReturnStatus.hxx>
|
||||
|
||||
typedef IFSelect_ReturnStatus (*IFSelect_ActFunc) (const Handle(IFSelect_SessionPilot)&);
|
||||
|
||||
#endif
|
@@ -1,19 +0,0 @@
|
||||
// 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 <IFSelect_FileModifier.ixx>
|
||||
|
||||
|
||||
|
||||
IFSelect_FileModifier::IFSelect_FileModifier ()
|
||||
: IFSelect_GeneralModifier (Standard_False) { }
|
@@ -63,9 +63,7 @@ DEFINE_STANDARD_HANDLE(IFSelect_GeneralModifier, MMgt_TShared)
|
||||
//! package IFAdapt, EntityModifier and EntityCopier
|
||||
class IFSelect_GeneralModifier : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
//! Returns True if this modifier may change the graph of
|
||||
//! dependences (aknowledged at creation time)
|
||||
@@ -99,13 +97,9 @@ public:
|
||||
//! Returns a short text which defines the operation performed
|
||||
Standard_EXPORT virtual TCollection_AsciiString Label() const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IFSelect_GeneralModifier,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
|
||||
//! Sets the Modifier criteria to default Values
|
||||
//! (i.e. "always applies")
|
||||
@@ -117,22 +111,11 @@ protected:
|
||||
//! dependencies when this modifier is applied
|
||||
Standard_EXPORT IFSelect_GeneralModifier(const Standard_Boolean maychangegraph);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
Handle(IFSelect_Selection) thesel;
|
||||
Handle(IFSelect_Dispatch) thedisp;
|
||||
Standard_Boolean thechgr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFSelect_GeneralModifier_HeaderFile
|
||||
|
@@ -12,7 +12,6 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <IFGraph_Cumulate.hxx>
|
||||
#include <IFSelect_SelectCombine.hxx>
|
||||
#include <IFSelect_Selection.hxx>
|
||||
#include <IFSelect_SelectionIterator.hxx>
|
||||
@@ -21,7 +20,6 @@
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectCombine,IFSelect_Selection)
|
||||
|
||||
IFSelect_SelectCombine::IFSelect_SelectCombine () { }
|
||||
// { thelist = new IFSelect_SequenceOfSelection(); }
|
||||
|
||||
Standard_Integer IFSelect_SelectCombine::NbInputs () const
|
||||
{ return thelist.Length(); }
|
||||
|
@@ -16,7 +16,6 @@
|
||||
#include <IFSelect_Selection.hxx>
|
||||
#include <IFSelect_SessionPilot.hxx>
|
||||
#include <IFSelect_SignCounter.hxx>
|
||||
#include <IFSelect_WorkLibrary.hxx>
|
||||
#include <IFSelect_WorkSession.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
@@ -60,27 +59,6 @@ static TCollection_AsciiString nulword;
|
||||
}
|
||||
|
||||
|
||||
Handle(IFSelect_WorkSession) IFSelect_SessionPilot::Session () const
|
||||
{ return thesession; }
|
||||
|
||||
Handle(IFSelect_WorkLibrary) IFSelect_SessionPilot::Library () const
|
||||
{ return thesession->WorkLibrary(); }
|
||||
|
||||
Standard_Boolean IFSelect_SessionPilot::RecordMode () const
|
||||
{ return therecord; }
|
||||
|
||||
void IFSelect_SessionPilot::SetSession
|
||||
(const Handle(IFSelect_WorkSession)& WS)
|
||||
{ thesession = WS; }
|
||||
|
||||
void IFSelect_SessionPilot::SetLibrary
|
||||
(const Handle(IFSelect_WorkLibrary)& WL)
|
||||
{ if (!thesession.IsNull()) thesession->SetLibrary(WL); }
|
||||
|
||||
void IFSelect_SessionPilot::SetRecordMode (const Standard_Boolean mode)
|
||||
{ therecord = mode; }
|
||||
|
||||
|
||||
void IFSelect_SessionPilot::SetCommandLine
|
||||
(const TCollection_AsciiString& command)
|
||||
{
|
||||
@@ -117,48 +95,10 @@ static TCollection_AsciiString nulword;
|
||||
#endif
|
||||
thenbwords ++;
|
||||
}
|
||||
/*
|
||||
aligner sur MAXWORDS
|
||||
char l0[80],l1[80],l2[80],l3[80],l4[80],l5[80],l6[80],l7[80],l8[80],l9[80];
|
||||
char m0[80],m1[80],m2[80],m3[80],m4[80],m5[80],m6[80],m7[80],m8[80],m9[80];
|
||||
thenbwords = sscanf
|
||||
(thecommand.ToCString(),"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
||||
l0,l1,l2,l3,l4,l5,l6,l7,l8,l9,m0,m1,m2,m3,m4,m5,m6,m7,m8,m9);
|
||||
if (thenbwords < 0) thenbwords = 0;
|
||||
if (thenbwords > MAXWORDS) thenbwords = MAXWORDS;
|
||||
Standard_Integer nb = thewords.Upper();
|
||||
for (i = 0; i <= nb; i ++) thewords(i).Clear();
|
||||
switch (thenbwords) {
|
||||
case 20 : thewords(19).AssignCat(m9);
|
||||
case 19 : thewords(18).AssignCat(m8);
|
||||
case 18 : thewords(17).AssignCat(m7);
|
||||
case 17 : thewords(16).AssignCat(m6);
|
||||
case 16 : thewords(15).AssignCat(m5);
|
||||
case 15 : thewords(14).AssignCat(m4);
|
||||
case 14 : thewords(13).AssignCat(m3);
|
||||
case 13 : thewords(12).AssignCat(m2);
|
||||
case 12 : thewords(11).AssignCat(m1);
|
||||
case 11 : thewords(10).AssignCat(m0);
|
||||
case 10 : thewords(9).AssignCat(l9);
|
||||
case 9 : thewords(8).AssignCat(l8);
|
||||
case 8 : thewords(7).AssignCat(l7);
|
||||
case 7 : thewords(6).AssignCat(l6);
|
||||
case 6 : thewords(5).AssignCat(l5);
|
||||
case 5 : thewords(4).AssignCat(l4);
|
||||
case 4 : thewords(3).AssignCat(l3);
|
||||
case 3 : thewords(2).AssignCat(l2);
|
||||
case 2 : thewords(1).AssignCat(l1);
|
||||
case 1 : thewords(0).AssignCat(l0);
|
||||
default : break;
|
||||
}
|
||||
*/
|
||||
thenumrec = 0;
|
||||
theobjrec.Nullify();
|
||||
}
|
||||
|
||||
const TCollection_AsciiString& IFSelect_SessionPilot::CommandLine () const
|
||||
{ return thecommand; }
|
||||
|
||||
Standard_CString IFSelect_SessionPilot::CommandPart
|
||||
(const Standard_Integer numarg) const
|
||||
{
|
||||
@@ -167,9 +107,6 @@ static TCollection_AsciiString nulword;
|
||||
return &(thecommand.ToCString())[thewordeb(numarg)-1];
|
||||
}
|
||||
|
||||
Standard_Integer IFSelect_SessionPilot::NbWords () const
|
||||
{ return thenbwords; }
|
||||
|
||||
const TCollection_AsciiString& IFSelect_SessionPilot::Word
|
||||
(const Standard_Integer num) const
|
||||
{ if (num < thenbwords) return thewords(num); return nulword; }
|
||||
@@ -204,14 +141,6 @@ static TCollection_AsciiString nulword;
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
Standard_Integer IFSelect_SessionPilot::NbCommands () const
|
||||
{ return thecomlist.Length(); }
|
||||
|
||||
const TCollection_AsciiString& IFSelect_SessionPilot::Command
|
||||
(const Standard_Integer num) const
|
||||
{ return thecomlist(num); }
|
||||
|
||||
|
||||
IFSelect_ReturnStatus IFSelect_SessionPilot::RecordItem
|
||||
(const Handle(Standard_Transient)& item)
|
||||
{
|
||||
@@ -219,13 +148,6 @@ static TCollection_AsciiString nulword;
|
||||
return (item.IsNull() ? IFSelect_RetFail : IFSelect_RetDone);
|
||||
}
|
||||
|
||||
Handle(Standard_Transient) IFSelect_SessionPilot::RecordedItem () const
|
||||
{ return theobjrec; }
|
||||
|
||||
void IFSelect_SessionPilot::Clear ()
|
||||
{ thecomlist.Clear(); }
|
||||
|
||||
|
||||
// #######################################################################
|
||||
// ######## CONTROLE D EXECUTION
|
||||
|
||||
|
@@ -21,19 +21,13 @@
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfAsciiString.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||
#include <IFSelect_Activator.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <IFSelect_ReturnStatus.hxx>
|
||||
#include <IFSelect_PrintCount.hxx>
|
||||
class IFSelect_WorkSession;
|
||||
class Standard_Transient;
|
||||
class IFSelect_WorkLibrary;
|
||||
class TCollection_AsciiString;
|
||||
class IFSelect_SignCounter;
|
||||
|
||||
|
||||
@@ -75,9 +69,7 @@ DEFINE_STANDARD_HANDLE(IFSelect_SessionPilot, IFSelect_Activator)
|
||||
//! are skipped (comment lines are display if read from file)
|
||||
class IFSelect_SessionPilot : public IFSelect_Activator
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
//! Creates an empty SessionPilot, with a prompt which will be
|
||||
//! displayed on querying commands. If not precised (""), this
|
||||
@@ -85,30 +77,23 @@ public:
|
||||
Standard_EXPORT IFSelect_SessionPilot(const Standard_CString prompt = "");
|
||||
|
||||
//! Returns the WorkSession which is worked on
|
||||
Standard_EXPORT Handle(IFSelect_WorkSession) Session() const;
|
||||
|
||||
//! Returns the WorKlibrary (Null if not set). WorkLibrary is used
|
||||
//! to Read and Write Files, according to the Norm
|
||||
Standard_EXPORT Handle(IFSelect_WorkLibrary) Library() const;
|
||||
const Handle(IFSelect_WorkSession) & Session() const { return thesession; }
|
||||
|
||||
//! Returns the Record Mode for Commands. Default is False.
|
||||
Standard_EXPORT Standard_Boolean RecordMode() const;
|
||||
Standard_Boolean RecordMode() const { return therecord; }
|
||||
|
||||
//! Sets a WorkSession to be worked on
|
||||
Standard_EXPORT void SetSession (const Handle(IFSelect_WorkSession)& WS);
|
||||
|
||||
//! Sets a WorkLibrary
|
||||
Standard_EXPORT void SetLibrary (const Handle(IFSelect_WorkLibrary)& WL);
|
||||
void SetSession (const Handle(IFSelect_WorkSession)& WS) { thesession = WS; }
|
||||
|
||||
//! Changes the RecordMode.
|
||||
Standard_EXPORT void SetRecordMode (const Standard_Boolean mode);
|
||||
void SetRecordMode (const Standard_Boolean mode) { therecord = mode; }
|
||||
|
||||
//! Sets the value of the Command Line to be interpreted
|
||||
//! Also prepares the interpretation (splitting by blanks)
|
||||
Standard_EXPORT void SetCommandLine (const TCollection_AsciiString& command);
|
||||
|
||||
//! Returns the Command Line to be interpreted
|
||||
Standard_EXPORT const TCollection_AsciiString& CommandLine() const;
|
||||
const TCollection_AsciiString& CommandLine() const { return thecommand; }
|
||||
|
||||
//! Returns the part of the command line which begins at argument
|
||||
//! <numarg> between 0 and NbWords-1 (by default, all the line)
|
||||
@@ -119,7 +104,7 @@ public:
|
||||
//! blanks : 0 if empty, one if a command without args, else it
|
||||
//! gives the count of args minus one.
|
||||
//! Warning : limited to 10 (command title + 9 args)
|
||||
Standard_EXPORT Standard_Integer NbWords() const;
|
||||
Standard_Integer NbWords() const { return thenbwords; }
|
||||
|
||||
//! Returns a word given its rank in the Command Line. Begins at 0
|
||||
//! which is the Command Title, 1 is the 1st arg., etc...
|
||||
@@ -134,10 +119,10 @@ public:
|
||||
Standard_EXPORT Standard_Boolean RemoveWord (const Standard_Integer num);
|
||||
|
||||
//! Returns the count of recorded Commands
|
||||
Standard_EXPORT Standard_Integer NbCommands() const;
|
||||
Standard_Integer NbCommands() const { return thecomlist.Length(); }
|
||||
|
||||
//! Returns a recorded Command, given its rank (from 1)
|
||||
Standard_EXPORT const TCollection_AsciiString& Command (const Standard_Integer num) const;
|
||||
const TCollection_AsciiString& Command (const Standard_Integer num) const { return thecomlist(num); }
|
||||
|
||||
//! Allows to associate a Transient Value with the last execution
|
||||
//! as a partial result
|
||||
@@ -147,10 +132,10 @@ public:
|
||||
|
||||
//! Returns the Transient Object which was recorded with the
|
||||
//! current Line Command. If none was, returns a Null Handle
|
||||
Standard_EXPORT Handle(Standard_Transient) RecordedItem() const;
|
||||
const Handle(Standard_Transient) & RecordedItem() const { return theobjrec; }
|
||||
|
||||
//! Clears the recorded informations (commands, objects)
|
||||
Standard_EXPORT void Clear();
|
||||
void Clear() { thecomlist.Clear(); }
|
||||
|
||||
//! Reads commands from a Script File, named <file>. By default
|
||||
//! (file = ""), reads from standard input with a prompt
|
||||
@@ -233,14 +218,6 @@ private:
|
||||
Standard_Integer thenumrec;
|
||||
Handle(Standard_Transient) theobjrec;
|
||||
TColStd_SequenceOfAsciiString thecomlist;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFSelect_SessionPilot_HeaderFile
|
||||
|
@@ -202,7 +202,6 @@ IFSelect_ShareOutResult::IFSelect_ShareOutResult
|
||||
|
||||
Interface_EntityIterator IFSelect_ShareOutResult::PacketContent ()
|
||||
{
|
||||
// IFGraph_Cumulate G(thegraph);
|
||||
Interface_EntityIterator iter = thedispres.Entities();
|
||||
Interface_Graph G(thegraph);
|
||||
// G.GetFromIter(thedispres.Entities(),0);
|
||||
|
@@ -26,9 +26,6 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_WorkLibrary,Standard_Transient)
|
||||
|
||||
// all deferred but Copy (virtual default)
|
||||
IFSelect_WorkLibrary::IFSelect_WorkLibrary () { thelevdef = 0; }
|
||||
|
||||
Standard_Boolean IFSelect_WorkLibrary::CopyModel
|
||||
(const Handle(Interface_InterfaceModel)& /*original*/,
|
||||
const Handle(Interface_InterfaceModel)& newmodel,
|
||||
|
@@ -50,9 +50,7 @@ DEFINE_STANDARD_HANDLE(IFSelect_WorkLibrary, Standard_Transient)
|
||||
//! kind of informations relevant for the norm,
|
||||
class IFSelect_WorkLibrary : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
//! Gives the way to Read a File and transfer it to a Model
|
||||
//! <mod> is the resulting Model, which has to be created by this
|
||||
@@ -118,32 +116,17 @@ public:
|
||||
//! Returns the help line recorded for <level>, or an empty string
|
||||
Standard_EXPORT Standard_CString DumpHelp (const Standard_Integer level) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IFSelect_WorkLibrary,Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
|
||||
//! Required to initialise fields
|
||||
Standard_EXPORT IFSelect_WorkLibrary();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
IFSelect_WorkLibrary() : thelevdef(0) {}
|
||||
|
||||
private:
|
||||
|
||||
Standard_Integer thelevdef;
|
||||
Handle(Interface_HArray1OfHAsciiString) thelevhlp;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IFSelect_WorkLibrary_HeaderFile
|
||||
|
@@ -20,9 +20,6 @@
|
||||
#include <IFGraph_SubPartsIterator.hxx>
|
||||
#include <IFSelect_CheckCounter.hxx>
|
||||
#include <IFSelect_Dispatch.hxx>
|
||||
#include <IFSelect_DispGlobal.hxx>
|
||||
#include <IFSelect_DispPerCount.hxx>
|
||||
#include <IFSelect_DispPerOne.hxx>
|
||||
#include <IFSelect_EditForm.hxx>
|
||||
#include <IFSelect_Editor.hxx>
|
||||
#include <IFSelect_GeneralModifier.hxx>
|
||||
@@ -1953,50 +1950,6 @@ Standard_Boolean IFSelect_WorkSession::SetFileRoot
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_CString IFSelect_WorkSession::GiveFileRoot
|
||||
(const Standard_CString file) const
|
||||
{
|
||||
OSD_Path path (file);
|
||||
if (!path.IsValid(TCollection_AsciiString(file))) return file; // tant pis ..
|
||||
bufstr = path.Name();
|
||||
return bufstr.ToCString();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_CString IFSelect_WorkSession::GiveFileComplete
|
||||
(const Standard_CString file) const
|
||||
{
|
||||
// ajouter si besoin : Prefix; Extension
|
||||
bufstr.Clear(); bufstr.AssignCat (file);
|
||||
Standard_Integer i,j = 0,nb = bufstr.Length();
|
||||
Handle(TCollection_HAsciiString) ext = FileExtension ();
|
||||
if (!ext.IsNull()) {
|
||||
char val0 = '\0'; if (ext->Length() > 0) val0 = ext->Value(1);
|
||||
for (i = nb; i > 0; i --) if (bufstr.Value(i) == val0) { j = 1; break; }
|
||||
if (j == 0) bufstr.AssignCat (ext->ToCString());
|
||||
}
|
||||
Handle(TCollection_HAsciiString) pre = FilePrefix ();
|
||||
if (!pre.IsNull()) {
|
||||
char val1 = '\0'; if (pre->Length() > 0) val1 = pre->Value(pre->Length());
|
||||
j = 0;
|
||||
for (i = nb; i > 0; i --) if (bufstr.Value(i) == val1) { j = 1; break; }
|
||||
if (j == 0) bufstr.Insert (1,pre->ToCString());
|
||||
}
|
||||
|
||||
return bufstr.ToCString();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
@@ -2156,11 +2109,6 @@ Standard_Boolean IFSelect_WorkSession::SendSplit ()
|
||||
|
||||
if (NbFiles() > 0) checks = thecopier->SendCopied (thelibrary,theprotocol);
|
||||
else {
|
||||
/*
|
||||
IFSelect_ShareOutResult eval (ShareOut(), thegraph->Graph());
|
||||
checks = thecopier->Send (eval, thelibrary, theprotocol);
|
||||
thecopier->SetRemaining (thegraph->CGraph());
|
||||
*/
|
||||
// Decomposer
|
||||
if (theshareout.IsNull()) return Standard_False;
|
||||
Standard_Integer i, nbd = theshareout->NbDispatches();
|
||||
@@ -2610,41 +2558,6 @@ Standard_Boolean IFSelect_WorkSession::CombineRemove
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(IFSelect_Selection) IFSelect_WorkSession::NewSelectPointed
|
||||
(const Handle(TColStd_HSequenceOfTransient)& list,
|
||||
const Standard_CString name)
|
||||
{
|
||||
Handle(IFSelect_SelectPointed) sel = new IFSelect_SelectPointed;
|
||||
if (!list.IsNull()) sel->AddList (list);
|
||||
if (AddNamedItem (name,sel) == 0) sel.Nullify();
|
||||
return sel;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean IFSelect_WorkSession::SetSelectPointed
|
||||
(const Handle(IFSelect_Selection)& sel,
|
||||
const Handle(TColStd_HSequenceOfTransient)& list,
|
||||
const Standard_Integer mode) const
|
||||
{
|
||||
DeclareAndCast(IFSelect_SelectPointed,sp,sel);
|
||||
if (sp.IsNull() || list.IsNull()) return Standard_False;
|
||||
if (mode == 0) sp->Clear();
|
||||
if (mode >= 0) sp->AddList(list);
|
||||
else sp->RemoveList(list);
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
|
||||
// ###########################################################################
|
||||
// .... Analyse d un CheckIterator par rapport a un graphe ....
|
||||
|
||||
|
@@ -703,14 +703,6 @@ public:
|
||||
//! root name is already defined for it
|
||||
Standard_EXPORT Standard_Boolean SetFileRoot (const Handle(IFSelect_Dispatch)& disp, const Standard_CString name);
|
||||
|
||||
//! Extracts File Root Name from a given complete file name
|
||||
//! (uses OSD_Path)
|
||||
Standard_EXPORT Standard_CString GiveFileRoot (const Standard_CString file) const;
|
||||
|
||||
//! Completes a file name as required, with Prefix and Extension
|
||||
//! (if defined; for a non-defined item, completes nothing)
|
||||
Standard_EXPORT Standard_CString GiveFileComplete (const Standard_CString file) const;
|
||||
|
||||
//! Erases all stored data from the File Evaluation
|
||||
//! (i.e. ALL former naming informations are lost)
|
||||
Standard_EXPORT void ClearFile();
|
||||
@@ -886,17 +878,6 @@ public:
|
||||
//! kind of SelectCombine or <selrem> is not source of <selcomb>
|
||||
Standard_EXPORT Standard_Boolean CombineRemove (const Handle(IFSelect_Selection)& selcomb, const Handle(IFSelect_Selection)& selrem);
|
||||
|
||||
//! Creates a new Selection, of type SelectPointed, its content
|
||||
//! starts with <list>. A name must be given (can be empty)
|
||||
Standard_EXPORT Handle(IFSelect_Selection) NewSelectPointed (const Handle(TColStd_HSequenceOfTransient)& list, const Standard_CString name);
|
||||
|
||||
//! Changes the content of a Selection of type SelectPointed
|
||||
//! According <mode> : 0 set <list> as new content (clear former)
|
||||
//! 1 : adds <list> to actual content
|
||||
//! -1 : removes <list> from actual content
|
||||
//! Returns True if done, False if <sel> is not a SelectPointed
|
||||
Standard_EXPORT Standard_Boolean SetSelectPointed (const Handle(IFSelect_Selection)& sel, const Handle(TColStd_HSequenceOfTransient)& list, const Standard_Integer mode) const;
|
||||
|
||||
//! Returns a Selection from a Name :
|
||||
//! - the name of a Selection : this Selection
|
||||
//! - the name of a Signature + criteria between (..) : a new
|
||||
|
@@ -4,6 +4,8 @@ IGESControl_AlgoContainer.cxx
|
||||
IGESControl_AlgoContainer.hxx
|
||||
IGESControl_Controller.cxx
|
||||
IGESControl_Controller.hxx
|
||||
IGESControl_FloatFormat.cxx
|
||||
IGESControl_FloatFormat.hxx
|
||||
IGESControl_IGESBoundary.cxx
|
||||
IGESControl_IGESBoundary.hxx
|
||||
IGESControl_Reader.cxx
|
||||
@@ -11,5 +13,7 @@ IGESControl_Reader.hxx
|
||||
IGESControl_Reader.lxx
|
||||
IGESControl_ToolContainer.cxx
|
||||
IGESControl_ToolContainer.hxx
|
||||
IGESControl_WorkLibrary.cxx
|
||||
IGESControl_WorkLibrary.hxx
|
||||
IGESControl_Writer.cxx
|
||||
IGESControl_Writer.hxx
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <Transfer_FinderProcess.hxx>
|
||||
//szv_c1:#include <Transfer_TransientMapper.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <TransferBRep_ShapeMapper.hxx>
|
||||
#include <XSAlgo.hxx>
|
||||
#include <XSAlgo_AlgoContainer.hxx>
|
||||
@@ -38,19 +38,13 @@ Standard_Boolean IGESControl_ActorWrite::Recognize (const Handle(Standard_Transi
|
||||
{
|
||||
DeclareAndCast(TransferBRep_ShapeMapper,shmap,start);
|
||||
if (!shmap.IsNull()) return Standard_True;
|
||||
/*szv_c1:DeclareAndCast(Transfer_TransientMapper,gemap,start);
|
||||
if (!gemap.IsNull()) {
|
||||
Handle(Standard_Transient) geom = gemap->Value();
|
||||
DeclareAndCast(Geom_Curve,Curve,geom);
|
||||
DeclareAndCast(Geom_Surface,Surf,geom);*/
|
||||
DeclareAndCast(Geom_Curve,Curve,start);
|
||||
DeclareAndCast(Geom_Surface,Surf,start);
|
||||
if (!Curve.IsNull() || !Surf.IsNull()) return Standard_True;
|
||||
//szv_c1:}
|
||||
DeclareAndCast(Geom_Curve,Curve,start);
|
||||
DeclareAndCast(Geom_Surface,Surf,start);
|
||||
if (!Curve.IsNull() || !Surf.IsNull()) return Standard_True;
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
Handle(Transfer_Binder) IGESControl_ActorWrite::Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForFinder)& TP)
|
||||
Handle(Transfer_Binder) IGESControl_ActorWrite::Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_Process)& TP)
|
||||
{
|
||||
XSAlgo::AlgoContainer()->PrepareForTransfer();
|
||||
|
||||
@@ -81,28 +75,23 @@ Handle(Transfer_Binder) IGESControl_ActorWrite::Transferring (const Handle(Stand
|
||||
XSAlgo::AlgoContainer()->MergeTransferInfo(FP, info);
|
||||
if (!ent.IsNull()) return new Transfer_SimpleBinderOfTransient(ent);
|
||||
}
|
||||
/*szv_c1:DeclareAndCast(Transfer_TransientMapper,gemap,start);
|
||||
if (!gemap.IsNull()) {
|
||||
Handle(Standard_Transient) geom = gemap->Value();
|
||||
DeclareAndCast(Geom_Curve,Curve,geom);
|
||||
DeclareAndCast(Geom_Surface,Surf,geom);*/
|
||||
DeclareAndCast(Geom_Curve,Curve,start);
|
||||
DeclareAndCast(Geom_Surface,Surf,start);
|
||||
|
||||
DeclareAndCast(Geom_Curve,Curve,start);
|
||||
DeclareAndCast(Geom_Surface,Surf,start);
|
||||
|
||||
// On reconnait : Curve et Surface de Geom
|
||||
// quid de Point; Geom2d ?
|
||||
|
||||
GeomToIGES_GeomCurve GC; GC.SetModel(modl);
|
||||
GeomToIGES_GeomSurface GS; GS.SetModel(modl);
|
||||
if (!Curve.IsNull())
|
||||
ent = GC.TransferCurve(Curve,Curve->FirstParameter(),Curve->LastParameter());
|
||||
else if (!Surf.IsNull()) {
|
||||
Standard_Real U1,U2,V1,V2;
|
||||
Surf->Bounds(U1,U2,V1,V2);
|
||||
ent = GS.TransferSurface(Surf,U1,U2,V1,V2);
|
||||
}
|
||||
if (!ent.IsNull()) return new Transfer_SimpleBinderOfTransient(ent);
|
||||
//szv_c1:}
|
||||
GeomToIGES_GeomCurve GC; GC.SetModel(modl);
|
||||
GeomToIGES_GeomSurface GS; GS.SetModel(modl);
|
||||
if (!Curve.IsNull())
|
||||
ent = GC.TransferCurve(Curve,Curve->FirstParameter(),Curve->LastParameter());
|
||||
else if (!Surf.IsNull()) {
|
||||
Standard_Real U1,U2,V1,V2;
|
||||
Surf->Bounds(U1,U2,V1,V2);
|
||||
ent = GS.TransferSurface(Surf,U1,U2,V1,V2);
|
||||
}
|
||||
if (!ent.IsNull()) return new Transfer_SimpleBinderOfTransient(ent);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -30,13 +30,13 @@ class IGESControl_ActorWrite : public Transfer_ActorOfFinderProcess
|
||||
IGESControl_ActorWrite() {}
|
||||
|
||||
//! Recognizes a ShapeMapper
|
||||
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Standard_Transient)& start) Standard_OVERRIDE;
|
||||
Standard_EXPORT Standard_Boolean Recognize (const Handle(Standard_Transient)& start) Standard_OVERRIDE;
|
||||
|
||||
//! Transfers Shape to IGES Entities
|
||||
//!
|
||||
//! ModeTrans may be : 0 -> groups of Faces
|
||||
//! or 1 -> BRep
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForFinder)& FP) Standard_OVERRIDE;
|
||||
Standard_EXPORT Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_Process)& FP) Standard_OVERRIDE;
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IGESControl_ActorWrite,Transfer_ActorOfFinderProcess)
|
||||
};
|
||||
|
@@ -14,56 +14,25 @@
|
||||
//#58 rln 28.12.98 changing default values for Global Section
|
||||
//sln 14.01.2002 OCC51 : verifying whether entry model of method ActorRead is IGESDatat_IGESModel
|
||||
|
||||
#include <IFSelect_EditForm.hxx>
|
||||
#include <IFSelect_SelectModelEntities.hxx>
|
||||
#include <IFSelect_SelectModelRoots.hxx>
|
||||
#include <IFSelect_SelectType.hxx>
|
||||
#include <IFSelect_SignCounter.hxx>
|
||||
#include <IFSelect_SignMultiple.hxx>
|
||||
#include <IFSelect_SignType.hxx>
|
||||
#include <IGESAppli.hxx>
|
||||
#include <IGESBasic_SubfigureDef.hxx>
|
||||
#include <IGESControl_ActorWrite.hxx>
|
||||
#include <IGESControl_AlgoContainer.hxx>
|
||||
#include <IGESControl_Controller.hxx>
|
||||
#include <IGESData.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESSelect_AutoCorrect.hxx>
|
||||
#include <IGESSelect_ComputeStatus.hxx>
|
||||
#include <IGESSelect_CounterOfLevelNumber.hxx>
|
||||
#include <IGESSelect_EditDirPart.hxx>
|
||||
#include <IGESSelect_EditHeader.hxx>
|
||||
#include <IGESSelect_FloatFormat.hxx>
|
||||
#include <IGESSelect_IGESName.hxx>
|
||||
#include <IGESSelect_IGESTypeForm.hxx>
|
||||
#include <IGESSelect_RemoveCurves.hxx>
|
||||
#include <IGESSelect_SelectBasicGeom.hxx>
|
||||
#include <IGESSelect_SelectBypassGroup.hxx>
|
||||
#include <IGESSelect_SelectBypassSubfigure.hxx>
|
||||
#include <IGESSelect_SelectFaces.hxx>
|
||||
#include <IGESSelect_SelectPCurves.hxx>
|
||||
#include <IGESSelect_SelectSubordinate.hxx>
|
||||
#include <IGESSelect_SelectVisibleStatus.hxx>
|
||||
#include <IGESSelect_SetGlobalParameter.hxx>
|
||||
#include <IGESSelect_SetLabel.hxx>
|
||||
#include <IGESSelect_SignColor.hxx>
|
||||
#include <IGESSelect_SignLevelNumber.hxx>
|
||||
#include <IGESSelect_SignStatus.hxx>
|
||||
#include <IGESSelect_UpdateFileName.hxx>
|
||||
#include <IGESSelect_WorkLibrary.hxx>
|
||||
#include <IGESData_FileProtocol.hxx>
|
||||
#include <IGESControl_WorkLibrary.hxx>
|
||||
#include <IGESAppli.hxx>
|
||||
#include <IGESAppli_Protocol.hxx>
|
||||
#include <IGESSolid.hxx>
|
||||
#include <IGESSolid_Protocol.hxx>
|
||||
#include <IGESToBRep.hxx>
|
||||
#include <IGESToBRep_Actor.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <IGESControl_ActorWrite.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||
#include <Transfer_FinderProcess.hxx>
|
||||
#include <XSAlgo.hxx>
|
||||
#include <XSControl_SelectForTransfer.hxx>
|
||||
#include <XSControl_WorkSession.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IGESControl_Controller,XSControl_Controller)
|
||||
@@ -79,51 +48,10 @@ IGESControl_Controller::IGESControl_Controller (const Standard_Boolean mod)
|
||||
{
|
||||
static Standard_Boolean init = Standard_False;
|
||||
if (!init) {
|
||||
init = Standard_True;
|
||||
IGESSolid::Init();
|
||||
IGESAppli::Init();
|
||||
init = Standard_True;
|
||||
}
|
||||
AddSessionItem (new IGESSelect_RemoveCurves(Standard_True) ,"iges-remove-pcurves");
|
||||
AddSessionItem (new IGESSelect_RemoveCurves(Standard_False),"iges-remove-curves-3d");
|
||||
AddSessionItem (new IGESSelect_SetLabel (0,Standard_True) ,"iges-clear-label");
|
||||
AddSessionItem (new IGESSelect_SetLabel (1,Standard_False),"iges-set-label-dnum");
|
||||
|
||||
AddSessionItem (new IGESSelect_AutoCorrect,"iges-auto-correct",Standard_True);
|
||||
AddSessionItem (new IGESSelect_ComputeStatus,"iges-compute-status",Standard_True);
|
||||
|
||||
Handle(IGESSelect_FloatFormat) flf = new IGESSelect_FloatFormat;
|
||||
flf->SetDefault (12);
|
||||
AddSessionItem (flf,"iges-float-digits-12",Standard_True);
|
||||
|
||||
// -- Sender Product Identification -- (pas un statique ...)
|
||||
Handle(IGESSelect_SetGlobalParameter) set3 = new IGESSelect_SetGlobalParameter(3);
|
||||
Handle(TCollection_HAsciiString) pa3 = Interface_Static::Static("write.iges.header.product")->HStringValue();
|
||||
set3->SetValue(pa3);
|
||||
AddSessionItem (pa3, "iges-header-val-sender");
|
||||
AddSessionItem (set3,"iges-header-set-sender",Standard_True);
|
||||
|
||||
AddSessionItem (new IGESSelect_UpdateFileName,"iges-update-file-name",Standard_True);
|
||||
|
||||
// -- Receiver -- Acces par Static, ajustable
|
||||
Handle(IGESSelect_SetGlobalParameter) set12 = new IGESSelect_SetGlobalParameter(12);
|
||||
Handle(TCollection_HAsciiString) pa12 = Interface_Static::Static("write.iges.header.receiver")->HStringValue();
|
||||
set12->SetValue(pa12);
|
||||
AddSessionItem (pa12, "iges-header-val-receiver");
|
||||
AddSessionItem (set12,"iges-header-set-receiver",Standard_True);
|
||||
|
||||
// -- Auteur -- acces par Static (demarre par whoami), ajustable
|
||||
Handle(IGESSelect_SetGlobalParameter) set21 = new IGESSelect_SetGlobalParameter(21);
|
||||
Handle(TCollection_HAsciiString) pa21 = Interface_Static::Static("write.iges.header.author")->HStringValue();
|
||||
set21->SetValue(pa21);
|
||||
AddSessionItem (pa21, "iges-header-val-author");
|
||||
AddSessionItem (set21,"iges-header-set-author",Standard_True);
|
||||
|
||||
// -- Compagnie (de l auteur) -- acces par Static, ajustable
|
||||
Handle(IGESSelect_SetGlobalParameter) set22 = new IGESSelect_SetGlobalParameter(22);
|
||||
Handle(TCollection_HAsciiString) pa22 = Interface_Static::Static("write.iges.header.company")->HStringValue();
|
||||
set22->SetValue(pa22);
|
||||
AddSessionItem (pa22, "iges-header-val-company");
|
||||
AddSessionItem (set22,"iges-header-set-company",Standard_True);
|
||||
|
||||
// -- STATICS
|
||||
|
||||
@@ -136,8 +64,8 @@ IGESControl_Controller::IGESControl_Controller (const Standard_Boolean mod)
|
||||
TraceStatic ("write.iges.unit",6);
|
||||
TraceStatic ("write.iges.brep.mode",6);
|
||||
|
||||
myAdaptorLibrary = new IGESSelect_WorkLibrary(themode);
|
||||
myAdaptorProtocol = IGESSelect_WorkLibrary::DefineProtocol();
|
||||
myAdaptorLibrary = new IGESControl_WorkLibrary(themode);
|
||||
myAdaptorProtocol = DefineProtocol();
|
||||
|
||||
Handle(IGESToBRep_Actor) anactiges = new IGESToBRep_Actor;
|
||||
anactiges->SetContinuity(0);
|
||||
@@ -150,150 +78,6 @@ IGESControl_Controller::IGESControl_Controller (const Standard_Boolean mod)
|
||||
SetModeWriteHelp (1,"BRep");
|
||||
}
|
||||
|
||||
void IGESControl_Controller::Customise(Handle(XSControl_WorkSession)& WS)
|
||||
{
|
||||
XSControl_Controller::Customise(WS);
|
||||
|
||||
// --- SELECTIONS, SIGNATURES, COMPTEURS, EDITEURS
|
||||
// -- BypassGroup / xst-model-roots
|
||||
|
||||
// Should be already set by the above call to Customise
|
||||
Handle(IFSelect_SelectModelEntities) xma;
|
||||
Handle(Standard_Transient) xma1 = WS->NamedItem("xst-model-all");
|
||||
if (xma1.IsNull()) xma = new IFSelect_SelectModelEntities;
|
||||
else {
|
||||
xma = Handle(IFSelect_SelectModelEntities)::DownCast(xma1);
|
||||
WS->AddNamedItem ("xst-model-all",xma);
|
||||
}
|
||||
|
||||
Handle(IFSelect_SelectModelRoots) xmr;
|
||||
Handle(Standard_Transient) xmr1 = WS->NamedItem("xst-model-roots");
|
||||
if (!xmr1.IsNull())
|
||||
xmr = Handle(IFSelect_SelectModelRoots)::DownCast(xmr1);
|
||||
else {
|
||||
xmr = new IFSelect_SelectModelRoots;
|
||||
WS->AddNamedItem ("xst-model-roots",xmr);
|
||||
}
|
||||
|
||||
Handle(XSControl_SelectForTransfer) xtr;
|
||||
Handle(Standard_Transient) xtr1 = WS->NamedItem("xst-transferrable-roots");
|
||||
if (!xtr1.IsNull())
|
||||
xtr = Handle(XSControl_SelectForTransfer)::DownCast(xtr1);
|
||||
else {
|
||||
xtr = new XSControl_SelectForTransfer;
|
||||
xtr->SetReader (WS->TransferReader());
|
||||
WS->AddNamedItem ("xst-transferrable-roots",xtr);
|
||||
}
|
||||
|
||||
if (!xmr.IsNull()) {
|
||||
Handle(IGESSelect_SelectVisibleStatus) visa = new IGESSelect_SelectVisibleStatus;
|
||||
visa->SetInput(xmr);
|
||||
WS->AddNamedItem ("iges-visible-roots",visa);
|
||||
Handle(IGESSelect_SelectVisibleStatus) vist = new IGESSelect_SelectVisibleStatus;
|
||||
vist->SetInput(xtr);
|
||||
WS->AddNamedItem ("iges-visible-transf-roots",vist);
|
||||
Handle(IGESSelect_SelectVisibleStatus) blka = new IGESSelect_SelectVisibleStatus;
|
||||
blka->SetDirect (Standard_False);
|
||||
blka->SetInput(xmr);
|
||||
WS->AddNamedItem ("iges-blanked-roots",blka);
|
||||
Handle(IGESSelect_SelectVisibleStatus) blkt = new IGESSelect_SelectVisibleStatus;
|
||||
blkt->SetDirect (Standard_False);
|
||||
blkt->SetInput(xtr);
|
||||
WS->AddNamedItem ("iges-blanked-transf-roots",blkt);
|
||||
Handle(IGESSelect_SelectSubordinate) indp = new IGESSelect_SelectSubordinate (0);
|
||||
indp->SetInput (xma);
|
||||
WS->AddNamedItem ("iges-status-independant",indp);
|
||||
|
||||
Handle(IGESSelect_SelectBypassGroup) sb = new IGESSelect_SelectBypassGroup;
|
||||
sb->SetInput(xmr);
|
||||
WS->AddNamedItem ("iges-bypass-group",sb);
|
||||
Handle(IGESSelect_SelectBypassSubfigure) sfi = new IGESSelect_SelectBypassSubfigure;
|
||||
sfi->SetInput(xmr);
|
||||
WS->AddNamedItem ("iges-bypass-subfigure",sfi);
|
||||
Handle(IGESSelect_SelectBypassGroup) sfb = new IGESSelect_SelectBypassGroup;
|
||||
sfb->SetInput(sfi);
|
||||
WS->AddNamedItem ("iges-bypass-group-subfigure",sfb);
|
||||
Handle(IGESSelect_SelectBasicGeom) sc3d = new IGESSelect_SelectBasicGeom(1);
|
||||
sc3d->SetInput(sfi);
|
||||
WS->AddNamedItem ("iges-curves-3d",sc3d);
|
||||
Handle(IGESSelect_SelectBasicGeom) sb3d = new IGESSelect_SelectBasicGeom(2);
|
||||
sb3d->SetInput(sfi);
|
||||
WS->AddNamedItem ("iges-basic-curves-3d",sb3d);
|
||||
Handle(IGESSelect_SelectBasicGeom) sbg = new IGESSelect_SelectBasicGeom(0);
|
||||
sbg->SetInput(sfi);
|
||||
WS->AddNamedItem ("iges-basic-geom",sbg);
|
||||
Handle(IGESSelect_SelectBasicGeom) srf = new IGESSelect_SelectBasicGeom(-1);
|
||||
srf->SetInput(sfi);
|
||||
WS->AddNamedItem ("iges-surfaces",srf);
|
||||
Handle(IGESSelect_SelectFaces) sfa = new IGESSelect_SelectFaces;
|
||||
sfa->SetInput(sfi);
|
||||
WS->AddNamedItem ("iges-faces",sfa );
|
||||
Handle(IGESSelect_SelectPCurves) spc = new IGESSelect_SelectPCurves(Standard_True);
|
||||
spc->SetInput(sfa);
|
||||
WS->AddNamedItem ("iges-pcurves",spc);
|
||||
|
||||
Handle(IFSelect_SelectType) snosub = new IFSelect_SelectType
|
||||
(STANDARD_TYPE(IGESBasic_SubfigureDef));
|
||||
snosub->SetDirect(Standard_False);
|
||||
snosub->SetInput(xmr);
|
||||
WS->AddNamedItem ("iges-no-indep-subfigure-def",snosub);
|
||||
|
||||
Handle(IGESSelect_IGESTypeForm) itf = new IGESSelect_IGESTypeForm(Standard_True);
|
||||
WS->AddNamedItem ("iges-type",itf);
|
||||
|
||||
Handle(IGESSelect_SignStatus) sigst = new IGESSelect_SignStatus;
|
||||
Handle(IFSelect_SignMultiple) typsta = new IFSelect_SignMultiple
|
||||
("IGES Type Form Status");
|
||||
typsta->Add (itf,15);
|
||||
typsta->Add (sigst);
|
||||
WS->AddNamedItem ("iges-type-status",typsta);
|
||||
|
||||
Handle(IFSelect_SignMultiple) typnam = new IFSelect_SignMultiple
|
||||
("IGES Type Form TypeName");
|
||||
typnam->Add (itf,4);
|
||||
typnam->Add (new IFSelect_SignType(Standard_True));
|
||||
WS->AddNamedItem ("iges-type-name",typnam);
|
||||
|
||||
Handle(IFSelect_SignCounter) itfs = new IFSelect_SignCounter
|
||||
(itf,Standard_False,Standard_True);
|
||||
WS->AddNamedItem ("iges-types",itfs);
|
||||
Handle(IGESSelect_CounterOfLevelNumber) levs =
|
||||
new IGESSelect_CounterOfLevelNumber;
|
||||
WS->AddNamedItem ("iges-levels",levs);
|
||||
|
||||
Handle(IGESSelect_SignLevelNumber) slev = new IGESSelect_SignLevelNumber(Standard_False);
|
||||
WS->AddNamedItem ("iges-level-number",slev);
|
||||
Handle(IGESSelect_IGESName) igna = new IGESSelect_IGESName;
|
||||
WS->AddNamedItem ("iges-name",igna);
|
||||
|
||||
Handle(IGESSelect_SignColor) scol1 = new IGESSelect_SignColor (1);
|
||||
WS->AddNamedItem ("iges-color-number",scol1);
|
||||
Handle(IGESSelect_SignColor) scol2 = new IGESSelect_SignColor (2);
|
||||
WS->AddNamedItem ("iges-color-name",scol2);
|
||||
Handle(IGESSelect_SignColor) scol3 = new IGESSelect_SignColor (3);
|
||||
WS->AddNamedItem ("iges-color-rgb",scol3);
|
||||
Handle(IGESSelect_SignColor) scol4 = new IGESSelect_SignColor (4);
|
||||
WS->AddNamedItem ("iges-color-red",scol4);
|
||||
Handle(IGESSelect_SignColor) scol5 = new IGESSelect_SignColor (5);
|
||||
WS->AddNamedItem ("iges-color-green",scol5);
|
||||
Handle(IGESSelect_SignColor) scol6 = new IGESSelect_SignColor (6);
|
||||
WS->AddNamedItem ("iges-color-blue",scol6);
|
||||
|
||||
Handle(IGESSelect_EditHeader) edhead = new IGESSelect_EditHeader;
|
||||
WS->AddNamedItem ("iges-header-edit",edhead);
|
||||
Handle(IFSelect_EditForm) edheadf = edhead->Form(Standard_False);
|
||||
WS->AddNamedItem ("iges-header",edheadf);
|
||||
|
||||
Handle(IGESSelect_EditDirPart) eddirp = new IGESSelect_EditDirPart;
|
||||
WS->AddNamedItem ("iges-dir-part-edit",eddirp);
|
||||
Handle(IFSelect_EditForm) eddirpf = eddirp->Form(Standard_False);
|
||||
WS->AddNamedItem ("iges-dir-part",eddirpf);
|
||||
|
||||
//szv:mySignType = typnam;
|
||||
WS->SetSignType( typnam );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : NewModel
|
||||
@@ -303,7 +87,7 @@ void IGESControl_Controller::Customise(Handle(XSControl_WorkSession)& WS)
|
||||
Handle(Interface_InterfaceModel) IGESControl_Controller::NewModel () const
|
||||
{
|
||||
// On prend un modele qu on prepare avec les statiques enregistres
|
||||
DeclareAndCast(IGESData_IGESModel,igm,Interface_InterfaceModel::Template("iges"));
|
||||
Handle(IGESData_IGESModel) igm = IGESData::NewModel();
|
||||
IGESData_GlobalSection GS = igm->GlobalSection();
|
||||
|
||||
GS.SetReceiveName (Interface_Static::Static("write.iges.header.receiver")->HStringValue());
|
||||
@@ -338,16 +122,33 @@ Handle(Transfer_ActorOfTransientProcess) IGESControl_Controller::ActorRead (cons
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean IGESControl_Controller::Init ()
|
||||
void IGESControl_Controller::Init ()
|
||||
{
|
||||
static Standard_Boolean inic = Standard_False;
|
||||
if (!inic) {
|
||||
inic = Standard_True;
|
||||
Handle(IGESControl_Controller) ADIGES = new IGESControl_Controller(Standard_False);
|
||||
ADIGES->AutoRecord();
|
||||
XSAlgo::Init();
|
||||
IGESToBRep::Init();
|
||||
IGESToBRep::SetAlgoContainer (new IGESControl_AlgoContainer());
|
||||
inic = Standard_True;
|
||||
}
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Init
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
const Handle(IGESData_Protocol) & IGESControl_Controller::DefineProtocol ()
|
||||
{
|
||||
static Handle(IGESData_FileProtocol) gIGESProto;
|
||||
if (gIGESProto.IsNull()) {
|
||||
Handle(IGESData_Protocol) aIGESProto1 = IGESSolid::Protocol();
|
||||
Handle(IGESData_Protocol) aIGESProto2 = IGESAppli::Protocol();
|
||||
gIGESProto = new IGESData_FileProtocol;
|
||||
gIGESProto->Add(aIGESProto1);
|
||||
gIGESProto->Add(aIGESProto2);
|
||||
}
|
||||
return gIGESProto;
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@
|
||||
class TopoDS_Shape;
|
||||
class Transfer_FinderProcess;
|
||||
class XSControl_WorkSession;
|
||||
class IGESData_Protocol;
|
||||
|
||||
|
||||
class IGESControl_Controller;
|
||||
@@ -37,11 +38,6 @@ class IGESControl_Controller : public XSControl_Controller
|
||||
{
|
||||
public:
|
||||
|
||||
//! Initializes the use of IGES Norm (the first time) and returns
|
||||
//! a Controller for IGES-5.1
|
||||
//! If <modefnes> is True, sets it to internal FNES format
|
||||
Standard_EXPORT IGESControl_Controller(const Standard_Boolean modefnes = Standard_False);
|
||||
|
||||
//! Creates a new empty Model ready to receive data of the Norm.
|
||||
//! It is taken from IGES Template Model
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const Standard_OVERRIDE;
|
||||
@@ -55,13 +51,20 @@ class IGESControl_Controller : public XSControl_Controller
|
||||
//! records it to various names, available to select it later
|
||||
//! Returns True when done, False if could not be done
|
||||
//! Also, it creates and records an Adaptor for FNES
|
||||
Standard_EXPORT static Standard_Boolean Init();
|
||||
Standard_EXPORT static void Init();
|
||||
|
||||
Standard_EXPORT virtual void Customise (Handle(XSControl_WorkSession)& WS) Standard_OVERRIDE;
|
||||
//! Defines a protocol to be adequate for IGES
|
||||
//! (encompasses ALL the IGES norm including IGESSolid, IGESAppli)
|
||||
Standard_EXPORT static const Handle(IGESData_Protocol) & DefineProtocol();
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IGESControl_Controller,XSControl_Controller)
|
||||
|
||||
private:
|
||||
protected:
|
||||
|
||||
//! Initializes the use of IGES Norm (the first time) and returns
|
||||
//! a Controller for IGES-5.1
|
||||
//! If <modefnes> is True, sets it to internal FNES format
|
||||
Standard_EXPORT IGESControl_Controller(const Standard_Boolean modefnes = Standard_False);
|
||||
|
||||
Standard_Boolean themode;
|
||||
};
|
||||
|
@@ -12,22 +12,20 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <IFSelect_ContextWrite.hxx>
|
||||
#include <IGESControl_FloatFormat.hxx>
|
||||
#include <IGESData_IGESWriter.hxx>
|
||||
#include <IGESSelect_FloatFormat.hxx>
|
||||
#include <Interface_FloatWriter.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_FloatFormat,IGESSelect_FileModifier)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IGESControl_FloatFormat,IFSelect_GeneralModifier)
|
||||
|
||||
IGESSelect_FloatFormat::IGESSelect_FloatFormat ()
|
||||
: thezerosup (Standard_True) , themainform ("%E") ,
|
||||
theformrange ("%f") , therangemin (0.1) , therangemax (1000.)
|
||||
{ }
|
||||
IGESControl_FloatFormat::IGESControl_FloatFormat ()
|
||||
: IFSelect_GeneralModifier (Standard_False),
|
||||
thezerosup (Standard_True) , themainform ("%E") ,
|
||||
theformrange ("%f") , therangemin (0.1) , therangemax (1000.)
|
||||
{}
|
||||
|
||||
void IGESSelect_FloatFormat::SetDefault (const Standard_Integer digits)
|
||||
void IGESControl_FloatFormat::SetDefault (const Standard_Integer digits)
|
||||
{
|
||||
themainform.Clear();
|
||||
theformrange.Clear();
|
||||
@@ -46,21 +44,17 @@ IGESSelect_FloatFormat::IGESSelect_FloatFormat ()
|
||||
thezerosup = Standard_True;
|
||||
}
|
||||
|
||||
void IGESSelect_FloatFormat::SetZeroSuppress (const Standard_Boolean mode)
|
||||
{ thezerosup = mode; }
|
||||
void IGESControl_FloatFormat::SetFormat (const Standard_CString format)
|
||||
{ themainform.Clear(); themainform.AssignCat(format); }
|
||||
|
||||
void IGESSelect_FloatFormat::SetFormat (const Standard_CString format)
|
||||
{ themainform.Clear(); themainform.AssignCat(format); }
|
||||
|
||||
|
||||
void IGESSelect_FloatFormat::SetFormatForRange
|
||||
void IGESControl_FloatFormat::SetFormatForRange
|
||||
(const Standard_CString form, const Standard_Real R1, const Standard_Real R2)
|
||||
{
|
||||
theformrange.Clear(); theformrange.AssignCat(form);
|
||||
therangemin = R1; therangemax = R2;
|
||||
}
|
||||
|
||||
void IGESSelect_FloatFormat::Format
|
||||
void IGESControl_FloatFormat::Format
|
||||
(Standard_Boolean& zerosup, TCollection_AsciiString& mainform,
|
||||
Standard_Boolean& hasrange, TCollection_AsciiString& formrange,
|
||||
Standard_Real& rangemin, Standard_Real& rangemax) const
|
||||
@@ -73,10 +67,7 @@ IGESSelect_FloatFormat::IGESSelect_FloatFormat ()
|
||||
rangemax = therangemax;
|
||||
}
|
||||
|
||||
|
||||
void IGESSelect_FloatFormat::Perform
|
||||
(IFSelect_ContextWrite& /*ctx*/,
|
||||
IGESData_IGESWriter& writer) const
|
||||
void IGESControl_FloatFormat::Perform (IGESData_IGESWriter& writer) const
|
||||
{
|
||||
writer.FloatWriter().SetFormat (themainform.ToCString());
|
||||
writer.FloatWriter().SetZeroSuppress (thezerosup);
|
||||
@@ -84,7 +75,7 @@ IGESSelect_FloatFormat::IGESSelect_FloatFormat ()
|
||||
(theformrange.ToCString(), therangemin, therangemax);
|
||||
}
|
||||
|
||||
TCollection_AsciiString IGESSelect_FloatFormat::Label () const
|
||||
TCollection_AsciiString IGESControl_FloatFormat::Label () const
|
||||
{
|
||||
TCollection_AsciiString lab("Float Format ");
|
||||
if (thezerosup) lab.AssignCat(" ZeroSup ");
|
@@ -14,40 +14,31 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _IGESSelect_FloatFormat_HeaderFile
|
||||
#define _IGESSelect_FloatFormat_HeaderFile
|
||||
#ifndef _IGESControl_FloatFormat_HeaderFile
|
||||
#define _IGESControl_FloatFormat_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <IGESSelect_FileModifier.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class TCollection_AsciiString;
|
||||
class IFSelect_ContextWrite;
|
||||
#include <IFSelect_GeneralModifier.hxx>
|
||||
class IGESData_IGESWriter;
|
||||
|
||||
|
||||
class IGESSelect_FloatFormat;
|
||||
DEFINE_STANDARD_HANDLE(IGESSelect_FloatFormat, IGESSelect_FileModifier)
|
||||
class IGESControl_FloatFormat;
|
||||
DEFINE_STANDARD_HANDLE(IGESControl_FloatFormat, IFSelect_GeneralModifier)
|
||||
|
||||
//! This class gives control out format for floatting values :
|
||||
//! ZeroSuppress or no, Main Format, Format in Range (for values
|
||||
//! around 1.), as IGESWriter allows to manage it.
|
||||
//! Formats are given under C-printf form
|
||||
class IGESSelect_FloatFormat : public IGESSelect_FileModifier
|
||||
class IGESControl_FloatFormat : public IFSelect_GeneralModifier
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
//! Creates a new FloatFormat, with standard options :
|
||||
//! ZeroSuppress, Main Format = %E,
|
||||
//! Format between 0.001 and 1000. = %f
|
||||
Standard_EXPORT IGESSelect_FloatFormat();
|
||||
Standard_EXPORT IGESControl_FloatFormat();
|
||||
|
||||
//! Sets FloatFormat to default value (see Create) but if <digits>
|
||||
//! is given positive, it commands Formats (main and range) to
|
||||
@@ -55,7 +46,7 @@ public:
|
||||
Standard_EXPORT void SetDefault (const Standard_Integer digits = 0);
|
||||
|
||||
//! Sets ZeroSuppress mode to a new value
|
||||
Standard_EXPORT void SetZeroSuppress (const Standard_Boolean mode);
|
||||
void SetZeroSuppress (const Standard_Boolean mode) { thezerosup = mode; }
|
||||
|
||||
//! Sets Main Format to a new value
|
||||
//! Remark : SetFormat, SetZeroSuppress and SetFormatForRange are
|
||||
@@ -84,38 +75,21 @@ public:
|
||||
|
||||
//! Sets the Floatting Formats of IGESWriter to the recorded
|
||||
//! parameters
|
||||
Standard_EXPORT void Perform (IFSelect_ContextWrite& ctx, IGESData_IGESWriter& writer) const Standard_OVERRIDE;
|
||||
Standard_EXPORT void Perform (IGESData_IGESWriter& writer) const;
|
||||
|
||||
//! Returns specific Label : for instance,
|
||||
//! "Float Format [ZeroSuppress] %E [, in range R1-R2 %f]"
|
||||
Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IGESControl_FloatFormat,IFSelect_GeneralModifier)
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IGESSelect_FloatFormat,IGESSelect_FileModifier)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
Standard_Boolean thezerosup;
|
||||
TCollection_AsciiString themainform;
|
||||
TCollection_AsciiString theformrange;
|
||||
Standard_Real therangemin;
|
||||
Standard_Real therangemax;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESSelect_FloatFormat_HeaderFile
|
||||
#endif // _IGESControl_FloatFormat_HeaderFile
|
@@ -20,7 +20,6 @@
|
||||
#include <Dico_IteratorOfDictionaryOfInteger.hxx>
|
||||
#include <Dico_IteratorOfDictionaryOfTransient.hxx>
|
||||
#include <IFSelect_CheckCounter.hxx>
|
||||
#include <IFSelect_Functions.hxx>
|
||||
#include <IGESControl_Controller.hxx>
|
||||
#include <IGESControl_Reader.hxx>
|
||||
#include <IGESData_FileProtocol.hxx>
|
||||
@@ -42,7 +41,6 @@
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
#include <TransferBRep.hxx>
|
||||
#include <XSControl_Controller.hxx>
|
||||
@@ -56,6 +54,7 @@
|
||||
//function : IGESControl_Reader
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
IGESControl_Reader::IGESControl_Reader ()
|
||||
{
|
||||
IGESControl_Controller::Init();
|
||||
@@ -147,7 +146,7 @@ void IGESControl_Reader::PrintTransferInfo
|
||||
if (! model.IsNull()) {
|
||||
nbEntities = model->NbEntities();
|
||||
nbRoots = TP->NbRoots();
|
||||
Transfer_IteratorOfProcessForTransient iterTrans = TP->RootResult(Standard_True);
|
||||
Transfer_TransientProcess::Iterator iterTrans = TP->RootResult(Standard_True);
|
||||
Handle(Dico_DictionaryOfInteger) dicoCountResult = new Dico_DictionaryOfInteger;
|
||||
Handle(Dico_DictionaryOfInteger) dicoCountMapping = new Dico_DictionaryOfInteger;
|
||||
for (iterTrans.Start(); iterTrans.More() ; iterTrans.Next() ) {
|
||||
|
@@ -15,8 +15,6 @@
|
||||
#include <IFSelect_ContextWrite.hxx>
|
||||
#include <IFSelect_GeneralModifier.hxx>
|
||||
#include <IGESAppli.hxx>
|
||||
#include <IGESAppli_Protocol.hxx>
|
||||
#include <IGESData_FileProtocol.hxx>
|
||||
#include <IGESData_IGESDumper.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
@@ -24,44 +22,30 @@
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESDefs.hxx>
|
||||
#include <IGESFile_Read.hxx>
|
||||
#include <IGESSelect_Dumper.hxx>
|
||||
#include <IGESSelect_FileModifier.hxx>
|
||||
#include <IGESSelect_WorkLibrary.hxx>
|
||||
#include <IGESControl_FloatFormat.hxx>
|
||||
#include <IGESControl_WorkLibrary.hxx>
|
||||
#include <IGESSolid.hxx>
|
||||
#include <IGESSolid_Protocol.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Interface_ReportEntity.hxx>
|
||||
#include <Message.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <OSD_OpenFile.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_HSequenceOfInteger.hxx>
|
||||
|
||||
#include <errno.h>
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_WorkLibrary,IFSelect_WorkLibrary)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IGESControl_WorkLibrary,IFSelect_WorkLibrary)
|
||||
|
||||
static int deja = 0;
|
||||
static Handle(IGESData_FileProtocol) IGESProto;
|
||||
|
||||
|
||||
IGESSelect_WorkLibrary::IGESSelect_WorkLibrary
|
||||
(const Standard_Boolean modefnes)
|
||||
: themodefnes (modefnes)
|
||||
IGESControl_WorkLibrary::IGESControl_WorkLibrary (const Standard_Boolean modefnes)
|
||||
: themodefnes (modefnes)
|
||||
{
|
||||
IGESSolid::Init();
|
||||
IGESAppli::Init();
|
||||
IGESDefs::Init();
|
||||
|
||||
if (!deja) {
|
||||
Handle(IGESSelect_Dumper) sesdump = new IGESSelect_Dumper; // ainsi,cestfait
|
||||
deja = 1;
|
||||
}
|
||||
SetDumpLevels (4,6);
|
||||
SetDumpHelp (0,"Only DNum");
|
||||
SetDumpHelp (1,"DNum, IGES Type & Form");
|
||||
@@ -72,7 +56,7 @@ static Handle(IGESData_FileProtocol) IGESProto;
|
||||
SetDumpHelp (6,"Complete + Transformed data");
|
||||
}
|
||||
|
||||
Standard_Integer IGESSelect_WorkLibrary::ReadFile
|
||||
Standard_Integer IGESControl_WorkLibrary::ReadFile
|
||||
(const Standard_CString name,
|
||||
Handle(Interface_InterfaceModel)& model,
|
||||
const Handle(Interface_Protocol)& protocol) const
|
||||
@@ -91,8 +75,7 @@ static Handle(IGESData_FileProtocol) IGESProto;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Standard_Boolean IGESSelect_WorkLibrary::WriteFile
|
||||
Standard_Boolean IGESControl_WorkLibrary::WriteFile
|
||||
(IFSelect_ContextWrite& ctx) const
|
||||
{
|
||||
Handle(Message_Messenger) sout = Message::DefaultMessenger();
|
||||
@@ -115,13 +98,12 @@ static Handle(IGESData_FileProtocol) IGESProto;
|
||||
Standard_Integer nbmod = ctx.NbModifiers();
|
||||
for (Standard_Integer numod = 1; numod <= nbmod; numod ++) {
|
||||
ctx.SetModifier (numod);
|
||||
DeclareAndCast(IGESSelect_FileModifier,filemod,ctx.FileModifier());
|
||||
if (!filemod.IsNull()) filemod->Perform(ctx,VW);
|
||||
DeclareAndCast(IGESControl_FloatFormat,filemod,ctx.FileModifier());
|
||||
if (!filemod.IsNull()) filemod->Perform(VW);
|
||||
// (impressions de mise au point)
|
||||
sout << " .. FileMod." << numod <<" "<< filemod->Label();
|
||||
if (ctx.IsForAll()) sout << " (all model)";
|
||||
else sout << " (" << ctx.NbEntities() << " entities)";
|
||||
// sout << flush;
|
||||
}
|
||||
|
||||
// Envoi
|
||||
@@ -139,20 +121,7 @@ static Handle(IGESData_FileProtocol) IGESProto;
|
||||
return status;
|
||||
}
|
||||
|
||||
Handle(IGESData_Protocol) IGESSelect_WorkLibrary::DefineProtocol ()
|
||||
{
|
||||
if (!IGESProto.IsNull()) return IGESProto;
|
||||
Handle(IGESData_Protocol) IGESProto1 = IGESSolid::Protocol();
|
||||
Handle(IGESData_Protocol) IGESProto2 = IGESAppli::Protocol();
|
||||
// Handle(IGESData_FileProtocol) IGESProto = new IGESData_FileProtocol;
|
||||
IGESProto = new IGESData_FileProtocol;
|
||||
IGESProto->Add(IGESProto1);
|
||||
IGESProto->Add(IGESProto2);
|
||||
return IGESProto;
|
||||
}
|
||||
|
||||
|
||||
void IGESSelect_WorkLibrary::DumpEntity
|
||||
void IGESControl_WorkLibrary::DumpEntity
|
||||
(const Handle(Interface_InterfaceModel)& model,
|
||||
const Handle(Interface_Protocol)& protocol,
|
||||
const Handle(Standard_Transient)& entity,
|
@@ -14,37 +14,30 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _IGESSelect_WorkLibrary_HeaderFile
|
||||
#define _IGESSelect_WorkLibrary_HeaderFile
|
||||
#ifndef _IGESControl_WorkLibrary_HeaderFile
|
||||
#define _IGESControl_WorkLibrary_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <IFSelect_WorkLibrary.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_Protocol;
|
||||
class IFSelect_ContextWrite;
|
||||
class IGESData_Protocol;
|
||||
class Standard_Transient;
|
||||
class Message_Messenger;
|
||||
|
||||
|
||||
class IGESSelect_WorkLibrary;
|
||||
DEFINE_STANDARD_HANDLE(IGESSelect_WorkLibrary, IFSelect_WorkLibrary)
|
||||
class IGESControl_WorkLibrary;
|
||||
DEFINE_STANDARD_HANDLE(IGESControl_WorkLibrary, IFSelect_WorkLibrary)
|
||||
|
||||
//! Performs Read and Write an IGES File with an IGES Model
|
||||
class IGESSelect_WorkLibrary : public IFSelect_WorkLibrary
|
||||
class IGESControl_WorkLibrary : public IFSelect_WorkLibrary
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
//! Creates a IGES WorkLibrary
|
||||
//! If <modefnes> is given as True, it will work for FNES
|
||||
Standard_EXPORT IGESSelect_WorkLibrary(const Standard_Boolean modefnes = Standard_False);
|
||||
Standard_EXPORT IGESControl_WorkLibrary(const Standard_Boolean modefnes = Standard_False);
|
||||
|
||||
//! Reads a IGES File and returns a IGES Model (into <mod>),
|
||||
//! or lets <mod> "Null" in case of Error
|
||||
@@ -55,36 +48,15 @@ public:
|
||||
//! Returns False (and writes no file) if <ctx> is not for IGES
|
||||
Standard_EXPORT Standard_Boolean WriteFile (IFSelect_ContextWrite& ctx) const Standard_OVERRIDE;
|
||||
|
||||
//! Defines a protocol to be adequate for IGES
|
||||
//! (encompasses ALL the IGES norm including IGESSolid, IGESAppli)
|
||||
Standard_EXPORT static Handle(IGESData_Protocol) DefineProtocol();
|
||||
|
||||
//! Dumps an IGES Entity with an IGES Dumper. <level> is the one
|
||||
//! used by IGESDumper.
|
||||
Standard_EXPORT void DumpEntity (const Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol, const Handle(Standard_Transient)& entity, const Handle(Message_Messenger)& S, const Standard_Integer level) const Standard_OVERRIDE;
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IGESControl_WorkLibrary,IFSelect_WorkLibrary)
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IGESSelect_WorkLibrary,IFSelect_WorkLibrary)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
Standard_Boolean themodefnes;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESSelect_WorkLibrary_HeaderFile
|
||||
#endif // _IGESControl_WorkLibrary_HeaderFile
|
@@ -34,14 +34,12 @@
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESData_IGESWriter.hxx>
|
||||
#include <IGESData_Protocol.hxx>
|
||||
#include <IGESSelect_WorkLibrary.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Message_ProgressIndicator.hxx>
|
||||
#include <OSD_OpenFile.hxx>
|
||||
#include <ShapeAnalysis_ShapeTolerance.hxx>
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Transfer_FinderProcess.hxx>
|
||||
@@ -55,7 +53,7 @@ IGESControl_Writer::IGESControl_Writer ()
|
||||
{
|
||||
// faudrait aussi (?) prendre les parametres par defaut ... ?
|
||||
IGESControl_Controller::Init();
|
||||
myEditor.Init(IGESSelect_WorkLibrary::DefineProtocol());
|
||||
myEditor.Init(IGESControl_Controller::DefineProtocol());
|
||||
myEditor.SetUnitName(Interface_Static::CVal ("write.iges.unit"));
|
||||
myEditor.ApplyUnit();
|
||||
myWriteMode = Interface_Static::IVal ("write.iges.brep.mode");
|
||||
@@ -69,7 +67,7 @@ IGESControl_Writer::IGESControl_Writer
|
||||
{
|
||||
// faudrait aussi (?) prendre les parametres par defaut ... ?
|
||||
IGESControl_Controller::Init();
|
||||
myEditor.Init(IGESSelect_WorkLibrary::DefineProtocol());
|
||||
myEditor.Init(IGESControl_Controller::DefineProtocol());
|
||||
myEditor.SetUnitName(unit);
|
||||
myEditor.ApplyUnit();
|
||||
myModel = myEditor.Model();
|
||||
@@ -79,7 +77,7 @@ IGESControl_Writer::IGESControl_Writer
|
||||
(const Handle(IGESData_IGESModel)& model, const Standard_Integer modecr)
|
||||
: myTP (new Transfer_FinderProcess(10000)) ,
|
||||
myModel (model) ,
|
||||
myEditor (model,IGESSelect_WorkLibrary::DefineProtocol()) ,
|
||||
myEditor (model,IGESControl_Controller::DefineProtocol()) ,
|
||||
myWriteMode (modecr) , myIsComputed (Standard_False) { }
|
||||
|
||||
Standard_Boolean IGESControl_Writer::AddShape (const TopoDS_Shape& theShape)
|
||||
@@ -212,7 +210,7 @@ Standard_Boolean IGESControl_Writer::AddGeom (const Handle(Standard_Transient)&
|
||||
Standard_Boolean IGESControl_Writer::AddEntity (const Handle(IGESData_IGESEntity)& ent)
|
||||
{
|
||||
if (ent.IsNull()) return Standard_False;
|
||||
myModel->AddWithRefs(ent,IGESSelect_WorkLibrary::DefineProtocol());
|
||||
myModel->AddWithRefs(ent,IGESControl_Controller::DefineProtocol());
|
||||
myIsComputed = Standard_False;
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -239,7 +237,7 @@ Standard_Boolean IGESControl_Writer::Write
|
||||
return Standard_False;
|
||||
IGESData_IGESWriter IW (myModel);
|
||||
// ne pas oublier le mode fnes ... a transmettre a IW
|
||||
IW.SendModel (IGESSelect_WorkLibrary::DefineProtocol());
|
||||
IW.SendModel (IGESControl_Controller::DefineProtocol());
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" ... ecriture ..."<<flush;
|
||||
#endif
|
||||
|
@@ -34,19 +34,21 @@
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
static Handle(IGESData_Protocol) proto;
|
||||
|
||||
static Handle(IGESData_Protocol) gIGESProto;
|
||||
static Handle(IGESData_IGESModel) gIGESModel;
|
||||
|
||||
static Handle(IGESData_DefaultGeneral) stmod;
|
||||
static Handle(IGESData_DefaultSpecific) speci;
|
||||
|
||||
|
||||
void IGESData::Init ()
|
||||
void IGESData::Init ()
|
||||
{
|
||||
if (proto.IsNull()) proto = new IGESData_Protocol;
|
||||
if (gIGESProto.IsNull()) gIGESProto = new IGESData_Protocol;
|
||||
if (stmod.IsNull()) stmod = new IGESData_DefaultGeneral;
|
||||
if (speci.IsNull()) speci = new IGESData_DefaultSpecific;
|
||||
// et modele template "iges"
|
||||
if (Interface_InterfaceModel::HasTemplate("iges")) return;
|
||||
|
||||
// et modele template "iges"
|
||||
if (!gIGESModel.IsNull()) return;
|
||||
|
||||
OSD_Process process;
|
||||
|
||||
@@ -140,52 +142,17 @@ static Handle(IGESData_DefaultSpecific) speci;
|
||||
//----------------------------
|
||||
|
||||
IGESData_GlobalSection GS;
|
||||
|
||||
//#58 rln 28.12.98 changing default values for Global Section
|
||||
char procver[80];
|
||||
sprintf (procver, XSTEP_PROCESSOR_VERSION, "IGES");
|
||||
Handle(TCollection_HAsciiString) gsys = new TCollection_HAsciiString (procver);
|
||||
Interface_Static::Init ("XSTEP","write.iges.header.product" ,'t',procver);
|
||||
|
||||
/* Handle(TCollection_HAsciiString) gsys = new TCollection_HAsciiString
|
||||
(XSTEP_VERSION);
|
||||
gsys->AssignCat(" on ");
|
||||
gsys->AssignCat
|
||||
#ifdef HPUX
|
||||
("HP-UX");
|
||||
cout<<"-- OSD_Path::SystemVersion, does not work well on HP-UX"<<endl;
|
||||
#endif
|
||||
#ifndef HPUX
|
||||
(host.SystemVersion().ToCString());
|
||||
#endif
|
||||
|
||||
// SendName : nom significatif de la piece transmise par exemple
|
||||
// SystemId : c est MDTV etc
|
||||
// InterfaceVersion : la version en cours de XSTEP; incluant la plateforme
|
||||
|
||||
char nomsys[100]; int istat; long lstat;
|
||||
struct utsname infosy;
|
||||
istat = uname (&infosy);
|
||||
lstat = sysinfo (SI_HW_PROVIDER,nomsys,99);
|
||||
Handle(TCollection_HAsciiString) gsys = new TCollection_HAsciiString(nomsys);
|
||||
gsys->AssignCat(" ");
|
||||
lstat = sysinfo (SI_ARCHITECTURE,nomsys,99);
|
||||
gsys->AssignCat(nomsys);
|
||||
gsys->AssignCat("/");
|
||||
gsys->AssignCat(infosy.sysname);
|
||||
gsys->AssignCat(" ");
|
||||
gsys->AssignCat(infosy.release);
|
||||
*/
|
||||
Standard_Integer year; //gka 19.01.99
|
||||
OSD_Process system;
|
||||
Quantity_Date ladate = system.SystemDate();
|
||||
year = ladate.Year();
|
||||
Handle(TCollection_HAsciiString) datestr;
|
||||
if( year < 2000 )
|
||||
//#65 rln 12.02.99 S4151 (explicitly force YYMMDD.HHMMSS before Y2000)
|
||||
datestr = GS.NewDateString(0,0,0,0,0,0,0);
|
||||
else
|
||||
//#65 rln 12.02.99 S4151 (explicitly force YYYYMMDD.HHMMSS after Y2000)
|
||||
datestr = GS.NewDateString(0,0,0,0,0,0,-1);
|
||||
const Standard_Integer year = ladate.Year();
|
||||
Handle(TCollection_HAsciiString) datestr = GS.NewDateString(0,0,0,0,0,0,( year < 2000 ? 0 : -1 )); //#65 rln 12.02.99 S4151 (explicitly force YYYYMMDD.HHMMSS after Y2000)
|
||||
GS.SetSeparator (',');
|
||||
GS.SetEndMark (';');
|
||||
GS.SetSendName (new TCollection_HAsciiString(Interface_Static::CVal("write.iges.header.product")));
|
||||
@@ -198,7 +165,6 @@ static Handle(IGESData_DefaultSpecific) speci;
|
||||
GS.SetMaxPower10Double ( RealLast10Exp() );
|
||||
GS.SetMaxDigitsDouble ( RealDigits() );
|
||||
GS.SetReceiveName (Interface_Static::Static("write.iges.header.receiver")->HStringValue());
|
||||
// new TCollection_HAsciiString("Unknown");
|
||||
GS.SetScale (1.0);
|
||||
GS.SetUnitFlag (Interface_Static::IVal("write.iges.unit"));
|
||||
GS.SetUnitName (new TCollection_HAsciiString(Interface_Static::CVal("write.iges.unit")));
|
||||
@@ -208,26 +174,28 @@ static Handle(IGESData_DefaultSpecific) speci;
|
||||
GS.SetResolution (0.0001);
|
||||
GS.SetMaxCoord (0.0 /*1000.0*/);//22.10.98 rln BUC60081
|
||||
GS.SetAuthorName (Interface_Static::Static("write.iges.header.author")->HStringValue());
|
||||
// new TCollection_HAsciiString (process.UserName());
|
||||
GS.SetCompanyName (Interface_Static::Static("write.iges.header.company")->HStringValue());
|
||||
// new TCollection_HAsciiString("Matra Datavision");
|
||||
GS.SetIGESVersion (11); // pour IGES-5.3 //gka 19.01.99
|
||||
GS.SetDraftingStandard (0);
|
||||
GS.SetLastChangeDate (datestr);
|
||||
GS.SetApplicationProtocol(new TCollection_HAsciiString("")); //gka 19.01.99
|
||||
|
||||
// Interface_Check check;
|
||||
// GS.Init(params, check);
|
||||
|
||||
// Creating the Model
|
||||
//-------------------
|
||||
|
||||
Handle(IGESData_IGESModel) model = new IGESData_IGESModel;
|
||||
model->SetGlobalSection(GS);
|
||||
Interface_InterfaceModel::SetTemplate ("iges", model);
|
||||
gIGESModel = new IGESData_IGESModel;
|
||||
gIGESModel->SetGlobalSection(GS);
|
||||
}
|
||||
|
||||
Handle(IGESData_Protocol) IGESData::Protocol ()
|
||||
const Handle(IGESData_Protocol) & IGESData::Protocol ()
|
||||
{
|
||||
return proto;
|
||||
return gIGESProto;
|
||||
}
|
||||
|
||||
Handle(IGESData_IGESModel) IGESData::NewModel ()
|
||||
{
|
||||
if (gIGESModel.IsNull()) return NULL;
|
||||
Handle(Interface_InterfaceModel) newmod = gIGESModel->NewEmptyModel();
|
||||
newmod->GetFromAnother (gIGESModel);
|
||||
return Handle(IGESData_IGESModel)::DownCast(newmod);
|
||||
}
|
||||
|
@@ -18,126 +18,24 @@
|
||||
#define _IGESData_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
class IGESData_Protocol;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_IGESModel;
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_LineFontEntity;
|
||||
class IGESData_LevelListEntity;
|
||||
class IGESData_TransfEntity;
|
||||
class IGESData_ViewKindEntity;
|
||||
class IGESData_LabelDisplayEntity;
|
||||
class IGESData_ColorEntity;
|
||||
class IGESData_NameEntity;
|
||||
class IGESData_SingleParentEntity;
|
||||
class IGESData_UndefinedEntity;
|
||||
class IGESData_FreeFormatEntity;
|
||||
class IGESData_GlobalSection;
|
||||
class IGESData_DefSwitch;
|
||||
class IGESData_DirChecker;
|
||||
class IGESData_IGESReaderData;
|
||||
class IGESData_IGESReaderTool;
|
||||
class IGESData_ParamReader;
|
||||
class IGESData_ParamCursor;
|
||||
class IGESData_DirPart;
|
||||
class IGESData_IGESType;
|
||||
class IGESData_FileRecognizer;
|
||||
class IGESData_IGESWriter;
|
||||
class IGESData_IGESDumper;
|
||||
class IGESData_BasicEditor;
|
||||
class IGESData_ToolLocation;
|
||||
class IGESData_GeneralModule;
|
||||
class IGESData_DefaultGeneral;
|
||||
class IGESData_ReadWriteModule;
|
||||
class IGESData_SpecificModule;
|
||||
class IGESData_DefaultSpecific;
|
||||
class IGESData_FileProtocol;
|
||||
class IGESData_WriterLib;
|
||||
class IGESData_SpecificLib;
|
||||
class IGESData_GlobalNodeOfWriterLib;
|
||||
class IGESData_NodeOfWriterLib;
|
||||
class IGESData_GlobalNodeOfSpecificLib;
|
||||
class IGESData_NodeOfSpecificLib;
|
||||
|
||||
|
||||
//! basic description of an IGES Interface
|
||||
class IGESData
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
public:
|
||||
|
||||
//! Prepares General dynamic data used for IGESData specifically :
|
||||
//! Protocol and Modules, which treat UndefinedEntity
|
||||
Standard_EXPORT static void Init();
|
||||
|
||||
//! Returns a Protocol from IGESData (avoids to create it)
|
||||
Standard_EXPORT static Handle(IGESData_Protocol) Protocol();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class IGESData_Protocol;
|
||||
friend class IGESData_IGESModel;
|
||||
friend class IGESData_IGESEntity;
|
||||
friend class IGESData_LineFontEntity;
|
||||
friend class IGESData_LevelListEntity;
|
||||
friend class IGESData_TransfEntity;
|
||||
friend class IGESData_ViewKindEntity;
|
||||
friend class IGESData_LabelDisplayEntity;
|
||||
friend class IGESData_ColorEntity;
|
||||
friend class IGESData_NameEntity;
|
||||
friend class IGESData_SingleParentEntity;
|
||||
friend class IGESData_UndefinedEntity;
|
||||
friend class IGESData_FreeFormatEntity;
|
||||
friend class IGESData_GlobalSection;
|
||||
friend class IGESData_DefSwitch;
|
||||
friend class IGESData_DirChecker;
|
||||
friend class IGESData_IGESReaderData;
|
||||
friend class IGESData_IGESReaderTool;
|
||||
friend class IGESData_ParamReader;
|
||||
friend class IGESData_ParamCursor;
|
||||
friend class IGESData_DirPart;
|
||||
friend class IGESData_IGESType;
|
||||
friend class IGESData_FileRecognizer;
|
||||
friend class IGESData_IGESWriter;
|
||||
friend class IGESData_IGESDumper;
|
||||
friend class IGESData_BasicEditor;
|
||||
friend class IGESData_ToolLocation;
|
||||
friend class IGESData_GeneralModule;
|
||||
friend class IGESData_DefaultGeneral;
|
||||
friend class IGESData_ReadWriteModule;
|
||||
friend class IGESData_SpecificModule;
|
||||
friend class IGESData_DefaultSpecific;
|
||||
friend class IGESData_FileProtocol;
|
||||
friend class IGESData_WriterLib;
|
||||
friend class IGESData_SpecificLib;
|
||||
friend class IGESData_GlobalNodeOfWriterLib;
|
||||
friend class IGESData_NodeOfWriterLib;
|
||||
friend class IGESData_GlobalNodeOfSpecificLib;
|
||||
friend class IGESData_NodeOfSpecificLib;
|
||||
Standard_EXPORT static const Handle(IGESData_Protocol) & Protocol();
|
||||
|
||||
//! Returns a Protocol from IGESData (avoids to create it)
|
||||
Standard_EXPORT static Handle(IGESData_IGESModel) NewModel ();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESData_HeaderFile
|
||||
|
@@ -13,6 +13,7 @@
|
||||
|
||||
//#73 rln 10.03.99 S4135: "read.scale.unit" does not affect GlobalSection
|
||||
|
||||
#include <IGESData.hxx>
|
||||
#include <IGESData_BasicEditor.hxx>
|
||||
#include <IGESData_ColorEntity.hxx>
|
||||
#include <IGESData_DirChecker.hxx>
|
||||
@@ -53,7 +54,7 @@ void IGESData_BasicEditor::Init (const Handle(IGESData_Protocol)& protocol)
|
||||
{
|
||||
theunit = Standard_False;
|
||||
theproto = protocol;
|
||||
themodel = GetCasted(IGESData_IGESModel,Interface_InterfaceModel::Template("iges"));
|
||||
themodel = IGESData::NewModel();
|
||||
theglib = Interface_GeneralLib (protocol);
|
||||
theslib = protocol;
|
||||
}
|
||||
@@ -154,7 +155,7 @@ Standard_Boolean IGESData_BasicEditor::SetUnitName (const Standard_CString name)
|
||||
Standard_Integer nb = themodel->NbEntities();
|
||||
if (nb == 0) return;
|
||||
TColStd_Array1OfInteger subs (0,nb); subs.Init(0); // gere Subordinate Status
|
||||
Interface_Graph G (themodel,theglib); // gere & memorise UseFlag
|
||||
Interface_Graph G (themodel); // gere & memorise UseFlag
|
||||
G.ResetStatus();
|
||||
|
||||
// 2 phases : d abord on fait un calcul d ensemble. Ensuite on applique
|
||||
|
@@ -1,9 +1,3 @@
|
||||
IGESSelect.cxx
|
||||
IGESSelect.hxx
|
||||
IGESSelect_Activator.cxx
|
||||
IGESSelect_Activator.hxx
|
||||
IGESSelect_AddFileComment.cxx
|
||||
IGESSelect_AddFileComment.hxx
|
||||
IGESSelect_AddGroup.cxx
|
||||
IGESSelect_AddGroup.hxx
|
||||
IGESSelect_AutoCorrect.cxx
|
||||
@@ -26,10 +20,6 @@ IGESSelect_EditDirPart.cxx
|
||||
IGESSelect_EditDirPart.hxx
|
||||
IGESSelect_EditHeader.cxx
|
||||
IGESSelect_EditHeader.hxx
|
||||
IGESSelect_FileModifier.hxx
|
||||
IGESSelect_FileModifier_0.cxx
|
||||
IGESSelect_FloatFormat.cxx
|
||||
IGESSelect_FloatFormat.hxx
|
||||
IGESSelect_IGESName.cxx
|
||||
IGESSelect_IGESName.hxx
|
||||
IGESSelect_IGESTypeForm.cxx
|
||||
@@ -90,5 +80,3 @@ IGESSelect_UpdateLastChange.cxx
|
||||
IGESSelect_UpdateLastChange.hxx
|
||||
IGESSelect_ViewSorter.cxx
|
||||
IGESSelect_ViewSorter.hxx
|
||||
IGESSelect_WorkLibrary.cxx
|
||||
IGESSelect_WorkLibrary.hxx
|
||||
|
@@ -1,55 +0,0 @@
|
||||
// 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 <IFSelect_Functions.hxx>
|
||||
#include <IFSelect_SessionPilot.hxx>
|
||||
#include <IFSelect_ShareOut.hxx>
|
||||
#include <IFSelect_WorkSession.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
#include <IGESSelect.hxx>
|
||||
#include <IGESSelect_Activator.hxx>
|
||||
#include <IGESSelect_WorkLibrary.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
void IGESSelect::Run ()
|
||||
{
|
||||
// Handle(IFSelect_BasicActivator) Activator = new IFSelect_BasicActivator;
|
||||
IFSelect_Functions::Init();
|
||||
Handle(IFSelect_SessionPilot) pilot = new IFSelect_SessionPilot("XSTEP-IGES>");
|
||||
Handle(IGESSelect_Activator) igesact = new IGESSelect_Activator;
|
||||
pilot->SetSession (new IFSelect_WorkSession ( ));
|
||||
pilot->SetLibrary (new IGESSelect_WorkLibrary);
|
||||
|
||||
pilot->ReadScript();
|
||||
}
|
||||
|
||||
|
||||
Standard_Integer IGESSelect::WhatIges
|
||||
(const Handle(IGESData_IGESEntity)& ent, const Interface_Graph& G,
|
||||
Handle(IGESData_IGESEntity)& /* sup */, Standard_Integer& /* index */)
|
||||
{
|
||||
Handle(IGESData_IGESEntity) igesent = ent;
|
||||
if (igesent.IsNull()) return Standard_False;
|
||||
// Standard_Integer igt = igesent->TypeNumber();
|
||||
DeclareAndCast(IGESData_IGESModel,model,G.Model());
|
||||
if (igesent.IsNull() || model.IsNull()) return 0;
|
||||
|
||||
// Plane : de View ? de SingleParent ? sinon cf TrimmedSurface & cie
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
@@ -1,169 +0,0 @@
|
||||
// Created on: 1994-05-31
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1994-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 _IGESSelect_HeaderFile
|
||||
#define _IGESSelect_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
class IGESData_IGESEntity;
|
||||
class Interface_Graph;
|
||||
class IGESSelect_EditHeader;
|
||||
class IGESSelect_EditDirPart;
|
||||
class IGESSelect_IGESTypeForm;
|
||||
class IGESSelect_IGESName;
|
||||
class IGESSelect_SignStatus;
|
||||
class IGESSelect_SignLevelNumber;
|
||||
class IGESSelect_SignColor;
|
||||
class IGESSelect_CounterOfLevelNumber;
|
||||
class IGESSelect_ViewSorter;
|
||||
class IGESSelect_DispPerSingleView;
|
||||
class IGESSelect_DispPerDrawing;
|
||||
class IGESSelect_SelectVisibleStatus;
|
||||
class IGESSelect_SelectSubordinate;
|
||||
class IGESSelect_SelectLevelNumber;
|
||||
class IGESSelect_SelectName;
|
||||
class IGESSelect_SelectFromSingleView;
|
||||
class IGESSelect_SelectFromDrawing;
|
||||
class IGESSelect_SelectSingleViewFrom;
|
||||
class IGESSelect_SelectDrawingFrom;
|
||||
class IGESSelect_SelectBypassGroup;
|
||||
class IGESSelect_SelectBypassSubfigure;
|
||||
class IGESSelect_SelectBasicGeom;
|
||||
class IGESSelect_SelectFaces;
|
||||
class IGESSelect_SelectPCurves;
|
||||
class IGESSelect_ModelModifier;
|
||||
class IGESSelect_FileModifier;
|
||||
class IGESSelect_FloatFormat;
|
||||
class IGESSelect_AddFileComment;
|
||||
class IGESSelect_UpdateFileName;
|
||||
class IGESSelect_UpdateCreationDate;
|
||||
class IGESSelect_UpdateLastChange;
|
||||
class IGESSelect_SetVersion5;
|
||||
class IGESSelect_SetGlobalParameter;
|
||||
class IGESSelect_AutoCorrect;
|
||||
class IGESSelect_ComputeStatus;
|
||||
class IGESSelect_RebuildDrawings;
|
||||
class IGESSelect_RebuildGroups;
|
||||
class IGESSelect_AddGroup;
|
||||
class IGESSelect_ChangeLevelNumber;
|
||||
class IGESSelect_ChangeLevelList;
|
||||
class IGESSelect_SplineToBSpline;
|
||||
class IGESSelect_RemoveCurves;
|
||||
class IGESSelect_SetLabel;
|
||||
class IGESSelect_WorkLibrary;
|
||||
class IGESSelect_Activator;
|
||||
class IGESSelect_Dumper;
|
||||
|
||||
|
||||
//! This package defines the library of the most used tools for
|
||||
//! IGES Files : Selections & Modifiers specific to the IGES norm,
|
||||
//! and the most needed converters
|
||||
class IGESSelect
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Simply gives a prompt for a conversational action on standard
|
||||
//! input/output. Returns the status of a
|
||||
Standard_EXPORT static void Run();
|
||||
|
||||
//! Gives a quick analysis of an IGES Entity in the context of a
|
||||
//! model (i.e. a File) described by a Graph.
|
||||
//! Returned values are :
|
||||
//! <sup> : the most meaningfull super entity, if any (else Null)
|
||||
//! <index> : meaningfull index relating to super entity, if any
|
||||
//! <returned> : a status which helps exploitation of <sup>, by
|
||||
//! giving a case
|
||||
//! (normally, types of <ent> and <sup> should suffice to
|
||||
//! known the case)
|
||||
Standard_EXPORT static Standard_Integer WhatIges (const Handle(IGESData_IGESEntity)& ent, const Interface_Graph& G, Handle(IGESData_IGESEntity)& sup, Standard_Integer& index);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class IGESSelect_EditHeader;
|
||||
friend class IGESSelect_EditDirPart;
|
||||
friend class IGESSelect_IGESTypeForm;
|
||||
friend class IGESSelect_IGESName;
|
||||
friend class IGESSelect_SignStatus;
|
||||
friend class IGESSelect_SignLevelNumber;
|
||||
friend class IGESSelect_SignColor;
|
||||
friend class IGESSelect_CounterOfLevelNumber;
|
||||
friend class IGESSelect_ViewSorter;
|
||||
friend class IGESSelect_DispPerSingleView;
|
||||
friend class IGESSelect_DispPerDrawing;
|
||||
friend class IGESSelect_SelectVisibleStatus;
|
||||
friend class IGESSelect_SelectSubordinate;
|
||||
friend class IGESSelect_SelectLevelNumber;
|
||||
friend class IGESSelect_SelectName;
|
||||
friend class IGESSelect_SelectFromSingleView;
|
||||
friend class IGESSelect_SelectFromDrawing;
|
||||
friend class IGESSelect_SelectSingleViewFrom;
|
||||
friend class IGESSelect_SelectDrawingFrom;
|
||||
friend class IGESSelect_SelectBypassGroup;
|
||||
friend class IGESSelect_SelectBypassSubfigure;
|
||||
friend class IGESSelect_SelectBasicGeom;
|
||||
friend class IGESSelect_SelectFaces;
|
||||
friend class IGESSelect_SelectPCurves;
|
||||
friend class IGESSelect_ModelModifier;
|
||||
friend class IGESSelect_FileModifier;
|
||||
friend class IGESSelect_FloatFormat;
|
||||
friend class IGESSelect_AddFileComment;
|
||||
friend class IGESSelect_UpdateFileName;
|
||||
friend class IGESSelect_UpdateCreationDate;
|
||||
friend class IGESSelect_UpdateLastChange;
|
||||
friend class IGESSelect_SetVersion5;
|
||||
friend class IGESSelect_SetGlobalParameter;
|
||||
friend class IGESSelect_AutoCorrect;
|
||||
friend class IGESSelect_ComputeStatus;
|
||||
friend class IGESSelect_RebuildDrawings;
|
||||
friend class IGESSelect_RebuildGroups;
|
||||
friend class IGESSelect_AddGroup;
|
||||
friend class IGESSelect_ChangeLevelNumber;
|
||||
friend class IGESSelect_ChangeLevelList;
|
||||
friend class IGESSelect_SplineToBSpline;
|
||||
friend class IGESSelect_RemoveCurves;
|
||||
friend class IGESSelect_SetLabel;
|
||||
friend class IGESSelect_WorkLibrary;
|
||||
friend class IGESSelect_Activator;
|
||||
friend class IGESSelect_Dumper;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESSelect_HeaderFile
|
@@ -1,69 +0,0 @@
|
||||
// Created on: 1994-08-26
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1994-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 <IFSelect_ContextWrite.hxx>
|
||||
#include <IGESData_IGESWriter.hxx>
|
||||
#include <IGESSelect_AddFileComment.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_AddFileComment,IGESSelect_FileModifier)
|
||||
|
||||
IGESSelect_AddFileComment::IGESSelect_AddFileComment ()
|
||||
{ thelist = new TColStd_HSequenceOfHAsciiString(); }
|
||||
|
||||
void IGESSelect_AddFileComment::Clear ()
|
||||
{ thelist->Clear(); }
|
||||
|
||||
|
||||
void IGESSelect_AddFileComment::AddLine (const Standard_CString line)
|
||||
{ thelist->Append (new TCollection_HAsciiString(line)); }
|
||||
|
||||
void IGESSelect_AddFileComment::AddLines
|
||||
(const Handle(TColStd_HSequenceOfHAsciiString)& lines)
|
||||
{ thelist->Append (lines); }
|
||||
|
||||
Standard_Integer IGESSelect_AddFileComment::NbLines () const
|
||||
{ return thelist->Length(); }
|
||||
|
||||
Standard_CString IGESSelect_AddFileComment::Line
|
||||
(const Standard_Integer num) const
|
||||
{ return thelist->Value(num)->ToCString(); }
|
||||
|
||||
Handle(TColStd_HSequenceOfHAsciiString) IGESSelect_AddFileComment::Lines
|
||||
() const
|
||||
{ return thelist; }
|
||||
|
||||
void IGESSelect_AddFileComment::Perform
|
||||
(IFSelect_ContextWrite& ,
|
||||
IGESData_IGESWriter& writer) const
|
||||
{
|
||||
Standard_Integer i, nb = NbLines();
|
||||
for (i = 1; i <= nb; i ++) {
|
||||
writer.SendStartLine (Line(i));
|
||||
}
|
||||
}
|
||||
|
||||
TCollection_AsciiString IGESSelect_AddFileComment::Label () const
|
||||
{
|
||||
Standard_Integer nb = NbLines();
|
||||
char labl[80];
|
||||
sprintf (labl, "Add %d Comment Lines (Start Section)",nb);
|
||||
return TCollection_AsciiString (labl);
|
||||
}
|
@@ -1,99 +0,0 @@
|
||||
// Created on: 1994-08-26
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1994-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 _IGESSelect_AddFileComment_HeaderFile
|
||||
#define _IGESSelect_AddFileComment_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfHAsciiString.hxx>
|
||||
#include <IGESSelect_FileModifier.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class IFSelect_ContextWrite;
|
||||
class IGESData_IGESWriter;
|
||||
class TCollection_AsciiString;
|
||||
|
||||
|
||||
class IGESSelect_AddFileComment;
|
||||
DEFINE_STANDARD_HANDLE(IGESSelect_AddFileComment, IGESSelect_FileModifier)
|
||||
|
||||
//! This class allows to add comment lines on writing an IGES File
|
||||
//! These lines are added to Start Section, instead of the only
|
||||
//! one blank line written by default.
|
||||
class IGESSelect_AddFileComment : public IGESSelect_FileModifier
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a new emoty AddFileComment. Use AddLine to complete it
|
||||
Standard_EXPORT IGESSelect_AddFileComment();
|
||||
|
||||
//! Clears the list of file comment lines already stored
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
//! Adds a line for file comment
|
||||
//! Remark : Lines are limited to 72 useful char.s . A line of more than
|
||||
//! 72 char.s will be splited into several ones of 72 max each.
|
||||
Standard_EXPORT void AddLine (const Standard_CString line);
|
||||
|
||||
//! Adds a list of lines for file comment
|
||||
//! Each of them must comply with demand of AddLine
|
||||
Standard_EXPORT void AddLines (const Handle(TColStd_HSequenceOfHAsciiString)& lines);
|
||||
|
||||
//! Returns the count of stored lines
|
||||
Standard_EXPORT Standard_Integer NbLines() const;
|
||||
|
||||
//! Returns a stored line given its rank
|
||||
Standard_EXPORT Standard_CString Line (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the complete list of lines in once
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfHAsciiString) Lines() const;
|
||||
|
||||
//! Sends the comment lines to the file (Start Section)
|
||||
Standard_EXPORT void Perform (IFSelect_ContextWrite& ctx, IGESData_IGESWriter& writer) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns specific Label, which is
|
||||
//! "Add <nn> Comment Lines (Start Section)"
|
||||
Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IGESSelect_AddFileComment,IGESSelect_FileModifier)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(TColStd_HSequenceOfHAsciiString) thelist;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESSelect_AddFileComment_HeaderFile
|
@@ -21,7 +21,7 @@
|
||||
#include <IGESSelect_DispPerDrawing.hxx>
|
||||
#include <IGESSelect_DispPerSingleView.hxx>
|
||||
#include <IGESSelect_Dumper.hxx>
|
||||
#include <IGESSelect_FloatFormat.hxx>
|
||||
#include <IGESControl_FloatFormat.hxx>
|
||||
#include <IGESSelect_RebuildDrawings.hxx>
|
||||
#include <IGESSelect_RebuildGroups.hxx>
|
||||
#include <IGESSelect_SelectBypassGroup.hxx>
|
||||
@@ -46,10 +46,6 @@
|
||||
#include <stdio.h>
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_Dumper,IFSelect_SessionDumper)
|
||||
|
||||
//#include <IGESSelect_SelectIGESTypeForm.hxx>
|
||||
IGESSelect_Dumper::IGESSelect_Dumper () { }
|
||||
|
||||
|
||||
Standard_Boolean IGESSelect_Dumper::WriteOwn
|
||||
(IFSelect_SessionFile& file, const Handle(Standard_Transient)& item) const
|
||||
{
|
||||
@@ -85,8 +81,8 @@ IGESSelect_Dumper::IGESSelect_Dumper () { }
|
||||
if (type == STANDARD_TYPE(IGESSelect_SelectDrawingFrom)) return Standard_True;
|
||||
if (type == STANDARD_TYPE(IGESSelect_SelectBypassGroup)) return Standard_True;
|
||||
|
||||
if (type == STANDARD_TYPE(IGESSelect_FloatFormat)) {
|
||||
DeclareAndCast(IGESSelect_FloatFormat,ff,item);
|
||||
if (type == STANDARD_TYPE(IGESControl_FloatFormat)) {
|
||||
DeclareAndCast(IGESControl_FloatFormat,ff,item);
|
||||
Standard_Boolean zerosup, hasrange;
|
||||
Standard_Real rangemin, rangemax;
|
||||
TCollection_AsciiString mainform,forminrange;
|
||||
@@ -197,9 +193,9 @@ IGESSelect_Dumper::IGESSelect_Dumper () { }
|
||||
if (type.IsEqual("IGESSelect_SelectBypassGroup"))
|
||||
{ item = new IGESSelect_SelectBypassGroup; return Standard_True; }
|
||||
|
||||
if (type.IsEqual("IGESSelect_FloatFormat")) {
|
||||
if (type.IsEqual("IGESControl_FloatFormat")) {
|
||||
if (file.NbParams() < 2) return Standard_False;
|
||||
Handle(IGESSelect_FloatFormat) ff = new IGESSelect_FloatFormat;
|
||||
Handle(IGESControl_FloatFormat) ff = new IGESControl_FloatFormat;
|
||||
Standard_Boolean zerosup;
|
||||
const TCollection_AsciiString zsup = file.ParamValue(1);
|
||||
if (zsup.Length() < 1) return Standard_False;
|
||||
|
@@ -21,12 +21,9 @@
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IFSelect_SessionDumper.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class IFSelect_SessionFile;
|
||||
class Standard_Transient;
|
||||
class TCollection_AsciiString;
|
||||
|
||||
|
||||
class IGESSelect_Dumper;
|
||||
DEFINE_STANDARD_HANDLE(IGESSelect_Dumper, IFSelect_SessionDumper)
|
||||
|
||||
@@ -35,12 +32,10 @@ DEFINE_STANDARD_HANDLE(IGESSelect_Dumper, IFSelect_SessionDumper)
|
||||
//! Dispatches, Modifiers
|
||||
class IGESSelect_Dumper : public IFSelect_SessionDumper
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
//! Creates a Dumper and puts it into the Library of Dumper
|
||||
Standard_EXPORT IGESSelect_Dumper();
|
||||
IGESSelect_Dumper() {}
|
||||
|
||||
//! Write the Own Parameters of Types defined in package IGESSelect
|
||||
//! Returns True if <item> has been processed, False else
|
||||
@@ -50,27 +45,7 @@ public:
|
||||
//! IGESSelect. Returns True if done and <item> created, False else
|
||||
Standard_EXPORT Standard_Boolean ReadOwn (IFSelect_SessionFile& file, const TCollection_AsciiString& type, Handle(Standard_Transient)& item) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IGESSelect_Dumper,IFSelect_SessionDumper)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESSelect_Dumper_HeaderFile
|
||||
|
@@ -1,75 +0,0 @@
|
||||
// Created on: 1994-05-31
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1994-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 _IGESSelect_FileModifier_HeaderFile
|
||||
#define _IGESSelect_FileModifier_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IFSelect_GeneralModifier.hxx>
|
||||
class IGESData_IGESWriter;
|
||||
class IFSelect_ContextWrite;
|
||||
|
||||
|
||||
class IGESSelect_FileModifier;
|
||||
DEFINE_STANDARD_HANDLE(IGESSelect_FileModifier, IFSelect_GeneralModifier)
|
||||
|
||||
|
||||
class IGESSelect_FileModifier : public IFSelect_GeneralModifier
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Perform the action specific to each class of File Modifier
|
||||
//! <ctx> is the ContextWrite, which brings : the model, the
|
||||
//! protocol, the file name, plus the object AppliedModifiers
|
||||
//! (not used here) and the CheckList
|
||||
//! Remark that the model has to be casted for specific access
|
||||
//!
|
||||
//! <writer> is the Writer and is specific to each norm, on which
|
||||
//! to act
|
||||
Standard_EXPORT virtual void Perform (IFSelect_ContextWrite& ctx, IGESData_IGESWriter& writer) const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI_INLINE(IGESSelect_FileModifier,IFSelect_GeneralModifier)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Sets a File Modifier to keep the graph of dependences
|
||||
//! unchanges (because it works on the model already produced)
|
||||
Standard_EXPORT IGESSelect_FileModifier();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESSelect_FileModifier_HeaderFile
|
@@ -1,39 +0,0 @@
|
||||
// Created on: 1994-05-31
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1994-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 <IGESSelect_FileModifier.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <IGESData_IGESWriter.hxx>
|
||||
#include <IFSelect_ContextWrite.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define Writer IGESData_IGESWriter
|
||||
#define Writer_hxx <IGESData_IGESWriter.hxx>
|
||||
#define IFSelect_FileModifier IGESSelect_FileModifier
|
||||
#define IFSelect_FileModifier_hxx <IGESSelect_FileModifier.hxx>
|
||||
#define Handle_IFSelect_FileModifier Handle(IGESSelect_FileModifier)
|
||||
#include <IFSelect_FileModifier.gxx>
|
||||
|
@@ -27,9 +27,7 @@
|
||||
// (Modules are created and loaded in appropriate libraries, once by Init)
|
||||
static Handle(IGESSolid_Protocol) protocol;
|
||||
|
||||
|
||||
|
||||
void IGESSolid::Init ()
|
||||
void IGESSolid::Init ()
|
||||
{
|
||||
IGESGeom::Init();
|
||||
if (protocol.IsNull()) {
|
||||
@@ -41,7 +39,7 @@ static Handle(IGESSolid_Protocol) protocol;
|
||||
}
|
||||
}
|
||||
|
||||
Handle(IGESSolid_Protocol) IGESSolid::Protocol ()
|
||||
const Handle(IGESSolid_Protocol) & IGESSolid::Protocol ()
|
||||
{
|
||||
return protocol;
|
||||
}
|
||||
|
@@ -18,153 +18,20 @@
|
||||
#define _IGESSolid_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
class IGESSolid_Protocol;
|
||||
class IGESSolid_Block;
|
||||
class IGESSolid_RightAngularWedge;
|
||||
class IGESSolid_Cylinder;
|
||||
class IGESSolid_ConeFrustum;
|
||||
class IGESSolid_Sphere;
|
||||
class IGESSolid_Torus;
|
||||
class IGESSolid_SolidOfRevolution;
|
||||
class IGESSolid_SolidOfLinearExtrusion;
|
||||
class IGESSolid_Ellipsoid;
|
||||
class IGESSolid_BooleanTree;
|
||||
class IGESSolid_SelectedComponent;
|
||||
class IGESSolid_SolidAssembly;
|
||||
class IGESSolid_ManifoldSolid;
|
||||
class IGESSolid_PlaneSurface;
|
||||
class IGESSolid_CylindricalSurface;
|
||||
class IGESSolid_ConicalSurface;
|
||||
class IGESSolid_SphericalSurface;
|
||||
class IGESSolid_ToroidalSurface;
|
||||
class IGESSolid_SolidInstance;
|
||||
class IGESSolid_VertexList;
|
||||
class IGESSolid_EdgeList;
|
||||
class IGESSolid_Loop;
|
||||
class IGESSolid_Face;
|
||||
class IGESSolid_Shell;
|
||||
class IGESSolid_ToolBlock;
|
||||
class IGESSolid_ToolRightAngularWedge;
|
||||
class IGESSolid_ToolCylinder;
|
||||
class IGESSolid_ToolConeFrustum;
|
||||
class IGESSolid_ToolSphere;
|
||||
class IGESSolid_ToolTorus;
|
||||
class IGESSolid_ToolSolidOfRevolution;
|
||||
class IGESSolid_ToolSolidOfLinearExtrusion;
|
||||
class IGESSolid_ToolEllipsoid;
|
||||
class IGESSolid_ToolBooleanTree;
|
||||
class IGESSolid_ToolSelectedComponent;
|
||||
class IGESSolid_ToolSolidAssembly;
|
||||
class IGESSolid_ToolManifoldSolid;
|
||||
class IGESSolid_ToolPlaneSurface;
|
||||
class IGESSolid_ToolCylindricalSurface;
|
||||
class IGESSolid_ToolConicalSurface;
|
||||
class IGESSolid_ToolSphericalSurface;
|
||||
class IGESSolid_ToolToroidalSurface;
|
||||
class IGESSolid_ToolSolidInstance;
|
||||
class IGESSolid_ToolVertexList;
|
||||
class IGESSolid_ToolEdgeList;
|
||||
class IGESSolid_ToolLoop;
|
||||
class IGESSolid_ToolFace;
|
||||
class IGESSolid_ToolShell;
|
||||
class IGESSolid_Protocol;
|
||||
class IGESSolid_ReadWriteModule;
|
||||
class IGESSolid_GeneralModule;
|
||||
class IGESSolid_SpecificModule;
|
||||
class IGESSolid_TopoBuilder;
|
||||
|
||||
|
||||
//! This package consists of B-Rep and CSG Solid entities
|
||||
class IGESSolid
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
public:
|
||||
|
||||
//! Prepares dynamic data (Protocol, Modules) for this package
|
||||
Standard_EXPORT static void Init();
|
||||
|
||||
//! Returns the Protocol for this Package
|
||||
Standard_EXPORT static Handle(IGESSolid_Protocol) Protocol();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class IGESSolid_Block;
|
||||
friend class IGESSolid_RightAngularWedge;
|
||||
friend class IGESSolid_Cylinder;
|
||||
friend class IGESSolid_ConeFrustum;
|
||||
friend class IGESSolid_Sphere;
|
||||
friend class IGESSolid_Torus;
|
||||
friend class IGESSolid_SolidOfRevolution;
|
||||
friend class IGESSolid_SolidOfLinearExtrusion;
|
||||
friend class IGESSolid_Ellipsoid;
|
||||
friend class IGESSolid_BooleanTree;
|
||||
friend class IGESSolid_SelectedComponent;
|
||||
friend class IGESSolid_SolidAssembly;
|
||||
friend class IGESSolid_ManifoldSolid;
|
||||
friend class IGESSolid_PlaneSurface;
|
||||
friend class IGESSolid_CylindricalSurface;
|
||||
friend class IGESSolid_ConicalSurface;
|
||||
friend class IGESSolid_SphericalSurface;
|
||||
friend class IGESSolid_ToroidalSurface;
|
||||
friend class IGESSolid_SolidInstance;
|
||||
friend class IGESSolid_VertexList;
|
||||
friend class IGESSolid_EdgeList;
|
||||
friend class IGESSolid_Loop;
|
||||
friend class IGESSolid_Face;
|
||||
friend class IGESSolid_Shell;
|
||||
friend class IGESSolid_ToolBlock;
|
||||
friend class IGESSolid_ToolRightAngularWedge;
|
||||
friend class IGESSolid_ToolCylinder;
|
||||
friend class IGESSolid_ToolConeFrustum;
|
||||
friend class IGESSolid_ToolSphere;
|
||||
friend class IGESSolid_ToolTorus;
|
||||
friend class IGESSolid_ToolSolidOfRevolution;
|
||||
friend class IGESSolid_ToolSolidOfLinearExtrusion;
|
||||
friend class IGESSolid_ToolEllipsoid;
|
||||
friend class IGESSolid_ToolBooleanTree;
|
||||
friend class IGESSolid_ToolSelectedComponent;
|
||||
friend class IGESSolid_ToolSolidAssembly;
|
||||
friend class IGESSolid_ToolManifoldSolid;
|
||||
friend class IGESSolid_ToolPlaneSurface;
|
||||
friend class IGESSolid_ToolCylindricalSurface;
|
||||
friend class IGESSolid_ToolConicalSurface;
|
||||
friend class IGESSolid_ToolSphericalSurface;
|
||||
friend class IGESSolid_ToolToroidalSurface;
|
||||
friend class IGESSolid_ToolSolidInstance;
|
||||
friend class IGESSolid_ToolVertexList;
|
||||
friend class IGESSolid_ToolEdgeList;
|
||||
friend class IGESSolid_ToolLoop;
|
||||
friend class IGESSolid_ToolFace;
|
||||
friend class IGESSolid_ToolShell;
|
||||
friend class IGESSolid_Protocol;
|
||||
friend class IGESSolid_ReadWriteModule;
|
||||
friend class IGESSolid_GeneralModule;
|
||||
friend class IGESSolid_SpecificModule;
|
||||
friend class IGESSolid_TopoBuilder;
|
||||
|
||||
Standard_EXPORT static const Handle(IGESSolid_Protocol) & Protocol();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESSolid_HeaderFile
|
||||
|
@@ -13,7 +13,6 @@ IGESToBRep_BRepEntity.cxx
|
||||
IGESToBRep_BRepEntity.hxx
|
||||
IGESToBRep_CurveAndSurface.cxx
|
||||
IGESToBRep_CurveAndSurface.hxx
|
||||
IGESToBRep_CurveAndSurface.lxx
|
||||
IGESToBRep_IGESBoundary.cxx
|
||||
IGESToBRep_IGESBoundary.hxx
|
||||
IGESToBRep_IGESBoundary.lxx
|
||||
|
@@ -111,7 +111,7 @@ static void TrimTolerances (const TopoDS_Shape& shape, const Standard_Real tol)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Transfer_Binder) IGESToBRep_Actor::Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForTransient)& PT)
|
||||
Handle(Transfer_Binder) IGESToBRep_Actor::Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_Process)& PT)
|
||||
{
|
||||
DeclareAndCast(IGESData_IGESModel,mymodel,themodel);
|
||||
DeclareAndCast(IGESData_IGESEntity,ent,start);
|
||||
|
@@ -35,7 +35,7 @@ class IGESToBRep_Actor : public Transfer_ActorOfTransientProcess
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Standard_Transient)& start) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForTransient)& TP) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_Process)& TP) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT void SetModel (const Handle(Interface_InterfaceModel)& model);
|
||||
|
||||
|
@@ -21,12 +21,9 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
class Geom_Surface;
|
||||
class IGESData_IGESModel;
|
||||
class Transfer_TransientProcess;
|
||||
class TopoDS_Shape;
|
||||
class IGESData_IGESEntity;
|
||||
class Message_Msg;
|
||||
@@ -35,11 +32,10 @@ class Message_Msg;
|
||||
//! Provides methods to transfer CurveAndSurface from IGES to CASCADE.
|
||||
class IGESToBRep_CurveAndSurface
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a tool CurveAndSurface ready to run, with
|
||||
//! epsilons set to 1.E-04, myModeTopo to True, the
|
||||
//! optimization of the continuity to False.
|
||||
@@ -57,28 +53,28 @@ public:
|
||||
Standard_EXPORT void Init();
|
||||
|
||||
//! Changes the value of "myEps"
|
||||
void SetEpsilon (const Standard_Real eps);
|
||||
void SetEpsilon (const Standard_Real eps) { myEps = eps; }
|
||||
|
||||
//! Returns the value of "myEps"
|
||||
Standard_Real GetEpsilon() const;
|
||||
Standard_Real GetEpsilon() const { return myEps; }
|
||||
|
||||
//! Changes the value of "myEpsCoeff"
|
||||
void SetEpsCoeff (const Standard_Real eps);
|
||||
void SetEpsCoeff (const Standard_Real eps) { myEpsCoeff = eps; }
|
||||
|
||||
//! Returns the value of "myEpsCoeff"
|
||||
Standard_Real GetEpsCoeff() const;
|
||||
Standard_Real GetEpsCoeff() const { return myEpsCoeff; }
|
||||
|
||||
//! Changes the value of "myEpsGeom"
|
||||
Standard_EXPORT void SetEpsGeom (const Standard_Real eps);
|
||||
|
||||
//! Returns the value of "myEpsGeom"
|
||||
Standard_Real GetEpsGeom() const;
|
||||
Standard_Real GetEpsGeom() const { return myEpsGeom; }
|
||||
|
||||
//! Changes the value of "myMinTol"
|
||||
void SetMinTol (const Standard_Real mintol);
|
||||
void SetMinTol (const Standard_Real mintol) { myMinTol = mintol; }
|
||||
|
||||
//! Changes the value of "myMaxTol"
|
||||
void SetMaxTol (const Standard_Real maxtol);
|
||||
void SetMaxTol (const Standard_Real maxtol) { myMaxTol = maxtol; }
|
||||
|
||||
//! Sets values of "myMinTol" and "myMaxTol" as follows
|
||||
//! myMaxTol = Max ("read.maxprecision.val", myEpsGeom * myUnitFactor)
|
||||
@@ -88,60 +84,60 @@ public:
|
||||
Standard_EXPORT void UpdateMinMaxTol();
|
||||
|
||||
//! Returns the value of "myMinTol"
|
||||
Standard_Real GetMinTol() const;
|
||||
Standard_Real GetMinTol() const { return myMinTol; }
|
||||
|
||||
//! Returns the value of "myMaxTol"
|
||||
Standard_Real GetMaxTol() const;
|
||||
Standard_Real GetMaxTol() const { return myMaxTol; }
|
||||
|
||||
//! Changes the value of "myModeApprox"
|
||||
void SetModeApprox (const Standard_Boolean mode);
|
||||
void SetModeApprox (const Standard_Boolean mode) { myModeApprox = mode; }
|
||||
|
||||
//! Returns the value of "myModeApprox"
|
||||
Standard_Boolean GetModeApprox() const;
|
||||
Standard_Boolean GetModeApprox() const { return myModeApprox; }
|
||||
|
||||
//! Changes the value of "myModeIsTopo"
|
||||
void SetModeTransfer (const Standard_Boolean mode);
|
||||
void SetModeTransfer (const Standard_Boolean mode) { myModeIsTopo = mode; }
|
||||
|
||||
//! Returns the value of "myModeIsTopo"
|
||||
Standard_Boolean GetModeTransfer() const;
|
||||
Standard_Boolean GetModeTransfer() const { return myModeIsTopo; }
|
||||
|
||||
//! Changes the value of "myContIsOpti"
|
||||
void SetOptimized (const Standard_Boolean optimized);
|
||||
void SetOptimized (const Standard_Boolean optimized) { myContIsOpti = optimized; }
|
||||
|
||||
//! Returns the value of "myContIsOpti"
|
||||
Standard_Boolean GetOptimized() const;
|
||||
Standard_Boolean GetOptimized() const { return myContIsOpti; }
|
||||
|
||||
//! Returns the value of " myUnitFactor"
|
||||
Standard_Real GetUnitFactor() const;
|
||||
Standard_Real GetUnitFactor() const { return myUnitFactor; }
|
||||
|
||||
//! Changes the value of "mySurfaceCurve"
|
||||
void SetSurfaceCurve (const Standard_Integer ival);
|
||||
void SetSurfaceCurve (const Standard_Integer ival) { mySurfaceCurve = ival; }
|
||||
|
||||
//! Returns the value of " mySurfaceCurve" 0 = value in
|
||||
//! file , 2 = kepp 2d and compute 3d 3 = keep 3d and
|
||||
//! compute 2d
|
||||
Standard_Integer GetSurfaceCurve() const;
|
||||
Standard_Integer GetSurfaceCurve() const { return mySurfaceCurve; }
|
||||
|
||||
//! Set the value of "myModel"
|
||||
Standard_EXPORT void SetModel (const Handle(IGESData_IGESModel)& model);
|
||||
|
||||
//! Returns the value of "myModel"
|
||||
Handle(IGESData_IGESModel) GetModel() const;
|
||||
const Handle(IGESData_IGESModel) & GetModel() const { return myModel; }
|
||||
|
||||
//! Changes the value of "myContinuity"
|
||||
//! if continuity = 0 do nothing else
|
||||
//! if continuity = 1 try C1
|
||||
//! if continuity = 2 try C2
|
||||
void SetContinuity (const Standard_Integer continuity);
|
||||
void SetContinuity (const Standard_Integer continuity) { myContinuity = continuity; }
|
||||
|
||||
//! Returns the value of "myContinuity"
|
||||
Standard_Integer GetContinuity() const;
|
||||
Standard_Integer GetContinuity() const { return myContinuity; }
|
||||
|
||||
//! Set the value of "myMsgReg"
|
||||
void SetTransferProcess (const Handle(Transfer_TransientProcess)& TP);
|
||||
void SetTransferProcess (const Handle(Transfer_TransientProcess)& TP) { myTP = TP; }
|
||||
|
||||
//! Returns the value of "myMsgReg"
|
||||
Handle(Transfer_TransientProcess) GetTransferProcess() const;
|
||||
const Handle(Transfer_TransientProcess) & GetTransferProcess() const { return myTP; }
|
||||
|
||||
//! Returns the result of the transfert of any IGES Curve
|
||||
//! or Surface Entity. If the transfer has failed, this
|
||||
@@ -154,14 +150,12 @@ public:
|
||||
Standard_EXPORT TopoDS_Shape TransferGeometry (const Handle(IGESData_IGESEntity)& start);
|
||||
|
||||
//! Records a new Fail message
|
||||
void SendFail (const Handle(IGESData_IGESEntity)& start, const Message_Msg& amsg);
|
||||
void SendFail (const Handle(IGESData_IGESEntity)& start, const Message_Msg& amsg)
|
||||
{ myTP->SendFail(start,amsg); }
|
||||
|
||||
//! Records a new Warning message
|
||||
void SendWarning (const Handle(IGESData_IGESEntity)& start, const Message_Msg& amsg);
|
||||
|
||||
//! Records a new Information message from the definition
|
||||
//! of a Msg (Original+Value)
|
||||
void SendMsg (const Handle(IGESData_IGESEntity)& start, const Message_Msg& amsg);
|
||||
void SendWarning (const Handle(IGESData_IGESEntity)& start, const Message_Msg& amsg)
|
||||
{ myTP->SendWarning(start,amsg); }
|
||||
|
||||
//! Returns True if start was already treated and has a result in "myMap"
|
||||
//! else returns False.
|
||||
@@ -192,18 +186,7 @@ public:
|
||||
|
||||
Standard_EXPORT Standard_Real GetUVResolution();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Standard_Real myEps;
|
||||
Standard_Real myEpsCoeff;
|
||||
@@ -221,15 +204,6 @@ private:
|
||||
Standard_Boolean myIsResolCom;
|
||||
Handle(IGESData_IGESModel) myModel;
|
||||
Handle(Transfer_TransientProcess) myTP;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IGESToBRep_CurveAndSurface.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESToBRep_CurveAndSurface_HeaderFile
|
||||
|
@@ -1,307 +0,0 @@
|
||||
// Created on: 2000-01-31
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 2000-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 <Transfer_TransientProcess.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : SetEpsilon
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetEpsilon(const Standard_Real eps)
|
||||
{
|
||||
myEps = eps;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetEpsilon
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Real IGESToBRep_CurveAndSurface::GetEpsilon() const
|
||||
{
|
||||
return myEps;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetEpsCoeff
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetEpsCoeff(const Standard_Real eps)
|
||||
{
|
||||
myEpsCoeff = eps;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetEpsCoeff
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Real IGESToBRep_CurveAndSurface::GetEpsCoeff() const
|
||||
{
|
||||
return myEpsCoeff;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetEpsGeom
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Real IGESToBRep_CurveAndSurface::GetEpsGeom() const
|
||||
{
|
||||
return myEpsGeom;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetMinTol
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetMinTol(const Standard_Real mintol)
|
||||
{
|
||||
myMinTol = mintol;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetMaxTol
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetMaxTol(const Standard_Real maxtol)
|
||||
{
|
||||
myMaxTol = maxtol;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetMinTol
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Real IGESToBRep_CurveAndSurface::GetMinTol() const
|
||||
{
|
||||
return myMinTol;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetMaxTol
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Real IGESToBRep_CurveAndSurface::GetMaxTol() const
|
||||
{
|
||||
return myMaxTol;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetModeApprox
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetModeApprox(const Standard_Boolean mode)
|
||||
{
|
||||
myModeApprox = mode;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetModeApprox
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean IGESToBRep_CurveAndSurface::GetModeApprox() const
|
||||
{
|
||||
return myModeApprox;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetModeTransfer
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetModeTransfer(const Standard_Boolean mode)
|
||||
{
|
||||
myModeIsTopo = mode;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetModeTransfer
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean IGESToBRep_CurveAndSurface::GetModeTransfer() const
|
||||
{
|
||||
return myModeIsTopo;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetOptimized
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetOptimized(const Standard_Boolean optimized)
|
||||
{
|
||||
myContIsOpti = optimized;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetOptimized
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean IGESToBRep_CurveAndSurface::GetOptimized() const
|
||||
{
|
||||
return myContIsOpti;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetUnitFactor
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Real IGESToBRep_CurveAndSurface::GetUnitFactor() const
|
||||
{
|
||||
return myUnitFactor;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetSurfaceCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetSurfaceCurve(const Standard_Integer ival)
|
||||
{
|
||||
mySurfaceCurve = ival;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetSurfaceCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer IGESToBRep_CurveAndSurface::GetSurfaceCurve() const
|
||||
{
|
||||
return mySurfaceCurve;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetModel
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Handle(IGESData_IGESModel) IGESToBRep_CurveAndSurface::GetModel() const
|
||||
{
|
||||
return myModel;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetContinuity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetContinuity(const Standard_Integer continuity)
|
||||
{
|
||||
myContinuity = continuity;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetContinuity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer IGESToBRep_CurveAndSurface::GetContinuity() const
|
||||
{
|
||||
return myContinuity;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetTransferProcess
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SetTransferProcess(const Handle(Transfer_TransientProcess)& TP)
|
||||
{
|
||||
myTP = TP;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetTransferProcess
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Handle(Transfer_TransientProcess) IGESToBRep_CurveAndSurface::GetTransferProcess() const
|
||||
{
|
||||
return myTP;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SendFail
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SendFail (const Handle(IGESData_IGESEntity)& start,
|
||||
const Message_Msg& amsg)
|
||||
{
|
||||
GetTransferProcess()->SendFail(start,amsg);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SendWarning
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SendWarning (const Handle(IGESData_IGESEntity)& start,
|
||||
const Message_Msg& amsg)
|
||||
{
|
||||
GetTransferProcess()->SendWarning(start,amsg);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SendMsg
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void IGESToBRep_CurveAndSurface::SendMsg (const Handle(IGESData_IGESEntity)& start,
|
||||
const Message_Msg& amsg)
|
||||
{
|
||||
GetTransferProcess()->SendMsg(start,amsg);
|
||||
}
|
||||
|
||||
|
@@ -51,7 +51,6 @@
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopoDS_Compound.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
#include <TransferBRep.hxx>
|
||||
#include <TransferBRep_ShapeBinder.hxx>
|
||||
@@ -60,7 +59,6 @@
|
||||
#include <XSAlgo_AlgoContainer.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
//#include <ShapeCustom.hxx>
|
||||
#ifdef _MSC_VER
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
@@ -75,7 +73,8 @@ static Handle(IGESData_FileProtocol) protocol;
|
||||
//function : IGESToBRep_Reader
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
IGESToBRep_Reader::IGESToBRep_Reader ()
|
||||
|
||||
IGESToBRep_Reader::IGESToBRep_Reader ()
|
||||
{
|
||||
theDone = Standard_False;
|
||||
if (protocol.IsNull()) {
|
||||
@@ -88,7 +87,6 @@ static Handle(IGESData_FileProtocol) protocol;
|
||||
theProc = new Transfer_TransientProcess;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : LoadFile
|
||||
//purpose : loads a Model from a file
|
||||
@@ -98,13 +96,13 @@ Standard_Integer IGESToBRep_Reader::LoadFile (const Standard_CString filename)
|
||||
{
|
||||
if ( theProc.IsNull() )
|
||||
theProc = new Transfer_TransientProcess;
|
||||
Handle(Message_Messenger) TF = theProc->Messenger();
|
||||
|
||||
const Handle(Message_Messenger) &TF = theProc->Messenger();
|
||||
|
||||
// Message for Diagnostic file.
|
||||
Message_Msg msg2000("IGES_2000");
|
||||
msg2000.Arg(filename);
|
||||
TF->Send (msg2000, Message_Info);
|
||||
//Message_Msg msg2001("IGES_2001"); // Date
|
||||
Message_Msg msg2005("IGES_2005");
|
||||
msg2005.Arg(theProc->TraceLevel());
|
||||
TF->Send (msg2005, Message_Info);
|
||||
@@ -118,11 +116,6 @@ Standard_Integer IGESToBRep_Reader::LoadFile (const Standard_CString filename)
|
||||
// Sending of message : IGES file opening error
|
||||
Message_Msg Msg2("XSTEP_2");
|
||||
TF->Send (Msg2, Message_Info);
|
||||
//Message_Msg Msg3("XSTEP_3");
|
||||
//Message_Msg Msg4("XSTEP_4");
|
||||
//Message_Msg Msg5("XSTEP_5");
|
||||
//Message_Msg Msg6("XSTEP_6");
|
||||
//Message_Msg Msg7("XSTEP_7");
|
||||
// Reasons of the file opening error
|
||||
switch(errno)
|
||||
{
|
||||
@@ -173,7 +166,6 @@ Standard_Integer IGESToBRep_Reader::LoadFile (const Standard_CString filename)
|
||||
nbWarn += ach->NbWarnings();
|
||||
nbFail += ach->NbFails();
|
||||
}
|
||||
// Messages nbWarn and nbFail;
|
||||
Msg25.Arg(nbFail);
|
||||
Msg26.Arg(nbWarn);
|
||||
TF->Send (Msg25, Message_Info);
|
||||
@@ -199,12 +191,12 @@ Standard_Integer IGESToBRep_Reader::LoadFile (const Standard_CString filename)
|
||||
return StatusFile;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetModel
|
||||
//purpose : Specifies a Model to work on
|
||||
//=======================================================================
|
||||
void IGESToBRep_Reader::SetModel (const Handle(IGESData_IGESModel)& model)
|
||||
|
||||
void IGESToBRep_Reader::SetModel (const Handle(IGESData_IGESModel)& model)
|
||||
{
|
||||
theModel = model;
|
||||
theDone = Standard_False;
|
||||
@@ -215,72 +207,20 @@ Standard_Integer IGESToBRep_Reader::LoadFile (const Standard_CString filename)
|
||||
theProc->Clear();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Model
|
||||
//purpose : returns the Model to be worked on
|
||||
//=======================================================================
|
||||
Handle(IGESData_IGESModel) IGESToBRep_Reader::Model () const
|
||||
{ return theModel; }
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetTransientProcess
|
||||
//purpose : Specifies a TransferProcess
|
||||
//=======================================================================
|
||||
void IGESToBRep_Reader::SetTransientProcess
|
||||
(const Handle(Transfer_TransientProcess)& TP)
|
||||
{ theProc = TP; }
|
||||
|
||||
//=======================================================================
|
||||
//function : TransientProcess
|
||||
//purpose : Returns the TransferProcess
|
||||
//=======================================================================
|
||||
Handle(Transfer_TransientProcess) IGESToBRep_Reader::TransientProcess () const
|
||||
{ return theProc; }
|
||||
|
||||
//=======================================================================
|
||||
//function : Actor
|
||||
//purpose : returns theActor
|
||||
//=======================================================================
|
||||
Handle(IGESToBRep_Actor) IGESToBRep_Reader::Actor () const
|
||||
{ return theActor; }
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Clear
|
||||
//purpose : Clears the result and Done status
|
||||
//=======================================================================
|
||||
void IGESToBRep_Reader::Clear ()
|
||||
{
|
||||
theDone = Standard_False;
|
||||
theShapes.Clear();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Check
|
||||
//purpose : Checks the Model
|
||||
//=======================================================================
|
||||
Standard_Boolean IGESToBRep_Reader::Check
|
||||
(const Standard_Boolean withprint) const
|
||||
|
||||
Standard_Boolean IGESToBRep_Reader::Check (const Standard_Boolean withprint) const
|
||||
{
|
||||
Interface_CheckTool cht (theModel,protocol);
|
||||
Interface_CheckIterator chl = cht.CompleteCheckList();
|
||||
if (withprint && !theProc.IsNull())
|
||||
cht.Print(chl, theProc->Messenger());
|
||||
chl.Print(theProc->Messenger(),theModel,Standard_False);
|
||||
return chl.IsEmpty(Standard_True);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : IsDone
|
||||
//purpose : returns True if the last transfert was a success
|
||||
//=======================================================================
|
||||
Standard_Boolean IGESToBRep_Reader::IsDone () const
|
||||
{ return theDone; }
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : EncodeRegul
|
||||
//purpose : INTERNAL to encode regularity on edges
|
||||
@@ -301,56 +241,13 @@ static Standard_Boolean EncodeRegul (const TopoDS_Shape& sh)
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateMap
|
||||
//purpose : Updates the correspondence map (Transfer_TransientProcess),
|
||||
// setting as translation results, the shapes received after
|
||||
// modification by modifier (BRepTools_Modifier)
|
||||
//warning : BRepTools_Modifier raises exception when it cannot find input
|
||||
// shape in its internal list
|
||||
//=======================================================================
|
||||
|
||||
// coment as unused PTV 18.09.2000
|
||||
// static void UpdateMap (const Handle(Transfer_TransientProcess)& map,
|
||||
// const BRepTools_Modifier& modifier)
|
||||
// {
|
||||
// Transfer_IteratorOfProcessForTransient iterator = map->CompleteResult(Standard_True);
|
||||
// for (iterator.Start(); iterator.More(); iterator.Next()) {
|
||||
// const Handle(Transfer_Binder) binder = iterator.Value();
|
||||
// try { //to avoid exception in BRepTools_Modifier
|
||||
// OCC_CATCH_SIGNALS
|
||||
// if (binder->IsKind (STANDARD_TYPE (TransferBRep_ShapeBinder))) {
|
||||
// DeclareAndCast(TransferBRep_ShapeBinder, shapebinder, binder);
|
||||
// if (shapebinder->HasResult()) {
|
||||
// TopoDS_Shape result = shapebinder->Result();
|
||||
// TopoDS_Shape modified = modifier.ModifiedShape (result);
|
||||
// if (shapebinder->Status() != Transfer_StatusUsed) //to avoid exception
|
||||
// shapebinder->SetResult (modified);
|
||||
// }
|
||||
// }
|
||||
// else if (binder->IsKind (STANDARD_TYPE (TransferBRep_ShapeListBinder))) {
|
||||
// DeclareAndCast(TransferBRep_ShapeListBinder, shapelistbinder, binder);
|
||||
// for (Standard_Integer i = 1; i <= shapelistbinder->NbShapes(); i++) {
|
||||
// TopoDS_Shape result = shapelistbinder->Shape (i);
|
||||
// TopoDS_Shape modified = modifier.ModifiedShape (result);
|
||||
// shapelistbinder->SetResult (i, modified);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// catch(Standard_Failure) {
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//=======================================================================
|
||||
//function : TrimTolerances
|
||||
//purpose : Trims tolerances of the shape according to static parameters
|
||||
//
|
||||
//=======================================================================
|
||||
|
||||
static void TrimTolerances (const TopoDS_Shape& shape,
|
||||
const Standard_Real tol)
|
||||
static void TrimTolerances (const TopoDS_Shape& shape, const Standard_Real tol)
|
||||
{
|
||||
if( Interface_Static::IVal("read.maxprecision.mode")==1) {
|
||||
ShapeFix_ShapeTolerance SFST;
|
||||
@@ -362,6 +259,7 @@ static void TrimTolerances (const TopoDS_Shape& shape,
|
||||
//function : TransferRoots
|
||||
//purpose : Transfers all Roots Entities
|
||||
//=======================================================================
|
||||
|
||||
void IGESToBRep_Reader::TransferRoots (const Standard_Boolean onlyvisible)
|
||||
{
|
||||
if (theModel.IsNull() || theProc.IsNull()) return;
|
||||
@@ -467,11 +365,11 @@ void IGESToBRep_Reader::TransferRoots (const Standard_Boolean onlyvisible)
|
||||
TF->Send (msg2065, Message_Info);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Transfer
|
||||
//purpose : Transfers an Entity given
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean IGESToBRep_Reader::Transfer(const Standard_Integer num)
|
||||
{
|
||||
Handle(Message_Messenger) TF = theProc->Messenger();
|
||||
@@ -589,39 +487,32 @@ Standard_Boolean IGESToBRep_Reader::Transfer(const Standard_Integer num)
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : UsedTolerance
|
||||
//purpose : Returns the used tolerance (input)
|
||||
//=======================================================================
|
||||
Standard_Real IGESToBRep_Reader::UsedTolerance () const
|
||||
{ return theActor->UsedTolerance(); }
|
||||
|
||||
//=======================================================================
|
||||
//function : NbShapes
|
||||
//purpose : Returns the count of produced Shapes
|
||||
//=======================================================================
|
||||
Standard_Integer IGESToBRep_Reader::NbShapes () const
|
||||
{ return theShapes.Length(); }
|
||||
|
||||
Standard_Real IGESToBRep_Reader::UsedTolerance () const
|
||||
{ return theActor->UsedTolerance(); }
|
||||
|
||||
//=======================================================================
|
||||
//function : Shape
|
||||
//purpose : Returns a Shape given its rank
|
||||
//=======================================================================
|
||||
TopoDS_Shape IGESToBRep_Reader::Shape (const Standard_Integer num) const
|
||||
|
||||
TopoDS_Shape IGESToBRep_Reader::Shape (const Standard_Integer num) const
|
||||
{
|
||||
TopoDS_Shape res;
|
||||
if (num > 0 && num <= theShapes.Length()) res = theShapes.Value(num);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : OneShape
|
||||
//purpose : Returns a unique Shape
|
||||
//=======================================================================
|
||||
TopoDS_Shape IGESToBRep_Reader::OneShape () const
|
||||
|
||||
TopoDS_Shape IGESToBRep_Reader::OneShape () const
|
||||
{
|
||||
TopoDS_Shape res;
|
||||
Standard_Integer nb = theShapes.Length();
|
||||
|
@@ -54,20 +54,20 @@ public:
|
||||
Standard_EXPORT void SetModel (const Handle(IGESData_IGESModel)& model);
|
||||
|
||||
//! Returns the Model to be worked on.
|
||||
Standard_EXPORT Handle(IGESData_IGESModel) Model() const;
|
||||
const Handle(IGESData_IGESModel) & Model() const { return theModel; }
|
||||
|
||||
//! Allows to set an already defined TransientProcess
|
||||
//! (to be called after LoadFile or SetModel)
|
||||
Standard_EXPORT void SetTransientProcess (const Handle(Transfer_TransientProcess)& TP);
|
||||
void SetTransientProcess (const Handle(Transfer_TransientProcess)& TP) { theProc = TP; }
|
||||
|
||||
//! Returns the TransientProcess
|
||||
Standard_EXPORT Handle(Transfer_TransientProcess) TransientProcess() const;
|
||||
const Handle(Transfer_TransientProcess) & TransientProcess() const { return theProc; }
|
||||
|
||||
//! Returns "theActor"
|
||||
Standard_EXPORT Handle(IGESToBRep_Actor) Actor() const;
|
||||
const Handle(IGESToBRep_Actor) & Actor() const { return theActor; }
|
||||
|
||||
//! Clears the results between two translation operations.
|
||||
Standard_EXPORT void Clear();
|
||||
void Clear() { theDone = Standard_False; theShapes.Clear(); }
|
||||
|
||||
//! Checks the IGES file that was
|
||||
//! loaded into memory. Displays error messages in the default
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
Standard_EXPORT Standard_Boolean Transfer (const Standard_Integer num);
|
||||
|
||||
//! Returns True if the LAST Transfer/TransferRoots was a success
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
Standard_Boolean IsDone() const { return theDone; }
|
||||
|
||||
//! Returns the Tolerance which has been actually used, converted
|
||||
//! in millimeters
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
Standard_EXPORT Standard_Real UsedTolerance() const;
|
||||
|
||||
//! Returns the number of shapes produced by the translation.
|
||||
Standard_EXPORT Standard_Integer NbShapes() const;
|
||||
Standard_Integer NbShapes() const { return theShapes.Length(); }
|
||||
|
||||
//! Returns the num the resulting shape in a translation operation.
|
||||
Standard_EXPORT TopoDS_Shape Shape (const Standard_Integer num = 1) const;
|
||||
@@ -107,32 +107,13 @@ public:
|
||||
//! - a compound containing the resulting shapes if there are several.
|
||||
Standard_EXPORT TopoDS_Shape OneShape() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Handle(IGESData_IGESModel) theModel;
|
||||
Standard_Boolean theDone;
|
||||
TopTools_SequenceOfShape theShapes;
|
||||
Handle(IGESToBRep_Actor) theActor;
|
||||
Handle(Transfer_TransientProcess) theProc;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESToBRep_Reader_HeaderFile
|
||||
|
@@ -102,7 +102,6 @@ Interface_STAT.cxx
|
||||
Interface_STAT.hxx
|
||||
Interface_Static.cxx
|
||||
Interface_Static.hxx
|
||||
Interface_Statics.hxx
|
||||
Interface_StaticStandards.cxx
|
||||
Interface_Translates.hxx
|
||||
Interface_TypedValue.cxx
|
||||
|
@@ -70,25 +70,10 @@ static void raisecheck (Handle(Interface_Check)& ach)
|
||||
|
||||
Interface_CheckTool::Interface_CheckTool(const Handle(Interface_InterfaceModel)& model,
|
||||
const Handle(Interface_Protocol)& protocol)
|
||||
: thegtool ( new Interface_GTool(protocol,model->NbEntities()) ) ,
|
||||
theshare (model,protocol)
|
||||
{
|
||||
thestat = 0;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Interface_CheckTool
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Interface_CheckTool::Interface_CheckTool(const Handle(Interface_InterfaceModel)& model)
|
||||
: thegtool(model->GTool()) , theshare (model,model->GTool())
|
||||
{
|
||||
thestat = 0;
|
||||
thegtool->Reservate(model->NbEntities());
|
||||
}
|
||||
|
||||
: Interface_ShareTool (model),
|
||||
thegtool (new Interface_GTool(protocol,model->NbEntities())),
|
||||
thestat (0)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : Interface_CheckTool
|
||||
@@ -96,10 +81,10 @@ Interface_CheckTool::Interface_CheckTool(const Handle(Interface_InterfaceModel)&
|
||||
//=======================================================================
|
||||
|
||||
Interface_CheckTool::Interface_CheckTool(const Interface_Graph& graph)
|
||||
: thegtool(graph.Model()->GTool()) , theshare (graph)
|
||||
{
|
||||
}
|
||||
|
||||
: Interface_ShareTool (graph),
|
||||
thegtool (graph.Model()->GTool()),
|
||||
thestat (0)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : Interface_CheckTool
|
||||
@@ -107,152 +92,17 @@ Interface_CheckTool::Interface_CheckTool(const Interface_Graph& graph)
|
||||
//=======================================================================
|
||||
|
||||
Interface_CheckTool::Interface_CheckTool(const Handle(Interface_HGraph)& hgraph)
|
||||
: thegtool(hgraph->Graph().Model()->GTool()) , theshare (hgraph)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FillCheck
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_CheckTool::FillCheck(const Handle(Standard_Transient)& ent,
|
||||
const Interface_ShareTool& sh,
|
||||
Handle(Interface_Check)& ach)
|
||||
{
|
||||
Handle(Interface_GeneralModule) module;
|
||||
Standard_Integer CN;
|
||||
if (thegtool->Select(ent,module,CN)) {
|
||||
// Sans try/catch (fait par l appelant, evite try/catch en boucle)
|
||||
if (!errh) {
|
||||
module->CheckCase(CN,ent,sh,ach);
|
||||
return;
|
||||
}
|
||||
// Avec try/catch
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
module->CheckCase(CN,ent,sh,ach);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
raisecheck(ach);
|
||||
}
|
||||
}
|
||||
else {
|
||||
DeclareAndCast(Interface_ReportEntity,rep,ent);
|
||||
if (rep.IsNull()) return;
|
||||
ach = rep->Check();
|
||||
}
|
||||
if (theshare.Graph().HasShareErrors(ent))
|
||||
ach->AddFail("** Shared Items unknown from the containing Model");
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Print
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_CheckTool::Print(const Handle(Interface_Check)& ach,
|
||||
const Handle(Message_Messenger)& S) const
|
||||
{
|
||||
Standard_Integer i, nb;
|
||||
nb = ach->NbFails();
|
||||
if (nb > 0) S << " Fail Messages : " << nb << " :\n";
|
||||
for (i = 1; i <= nb; i ++) {
|
||||
S << ach->Fail(i) << "\n";
|
||||
}
|
||||
nb = ach->NbWarnings();
|
||||
if (nb > 0) S << " Warning Messages : " << nb << " :\n";
|
||||
for (i = 1; i <= nb; i ++) {
|
||||
S << ach->Warning(i) << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Print
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_CheckTool::Print(const Interface_CheckIterator& list,
|
||||
const Handle(Message_Messenger)& S) const
|
||||
{
|
||||
Handle(Interface_InterfaceModel) model = theshare.Model();
|
||||
list.Print(S,model,Standard_False);
|
||||
}
|
||||
: Interface_ShareTool (hgraph),
|
||||
thegtool (hgraph->Graph().Model()->GTool()),
|
||||
thestat (0)
|
||||
{}
|
||||
|
||||
|
||||
// .... Check General sur un Modele ....
|
||||
|
||||
|
||||
// Check : Une Entite d un Modele, designee par son rang
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Check
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Interface_Check) Interface_CheckTool::Check(const Standard_Integer num)
|
||||
{
|
||||
Handle(Interface_InterfaceModel) model = theshare.Model();
|
||||
Handle(Standard_Transient) ent = model->Value(num);
|
||||
Handle(Interface_Check) ach = new Interface_Check(ent); // non filtre par "Warning" : tel quel
|
||||
errh = 1;
|
||||
FillCheck(ent,theshare,ach);
|
||||
return ach;
|
||||
}
|
||||
|
||||
|
||||
// CheckSuccess : test passe-passe pas, sur CheckList(Fail) des Entites
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : CheckSuccess
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_CheckTool::CheckSuccess (const Standard_Boolean reset)
|
||||
{
|
||||
if (reset) thestat = 0;
|
||||
if (thestat > 3) Interface_CheckFailure::Raise // deja teste avec erreur
|
||||
("Interface Model : Global Check");
|
||||
Handle(Interface_InterfaceModel) model = theshare.Model();
|
||||
if (model->GlobalCheck()->NbFails() > 0) Interface_CheckFailure::Raise
|
||||
("Interface Model : Global Check");
|
||||
Handle(Interface_Check) modchk = new Interface_Check;
|
||||
model->VerifyCheck(modchk);
|
||||
if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (theshare.Graph(),modchk);
|
||||
if (modchk->HasFailed()) Interface_CheckFailure::Raise
|
||||
("Interface Model : Verify Check");
|
||||
if (thestat == 3) return; // tout teste et ca passe
|
||||
|
||||
errh = 0; // Pas de try/catch, car justement on raise
|
||||
Standard_Integer nb = model->NbEntities();
|
||||
for (Standard_Integer i = 1; i <= nb; i ++) {
|
||||
if (model->IsErrorEntity(i)) Interface_CheckFailure::Raise
|
||||
("Interface Model : an Entity is recorded as Erroneous");
|
||||
Handle(Standard_Transient) ent = model->Value(i);
|
||||
if (thestat & 1) {
|
||||
if (!model->IsErrorEntity(i)) continue; // deja verify, reste analyse
|
||||
}
|
||||
if (thestat & 2) {
|
||||
if ( model->IsErrorEntity(i)) continue; // deja analyse, reste verify
|
||||
}
|
||||
|
||||
Handle(Interface_Check) ach = new Interface_Check(ent);
|
||||
FillCheck(ent,theshare,ach);
|
||||
if (ach->HasFailed()) Interface_CheckFailure::Raise
|
||||
("Interface Model : Check on an Entity has Failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// CompleteCheckList : Tous Tests : GlobalCheck, Analyse-Verify en Fail ou en
|
||||
// Warning; plus les Unknown Entities (par Check vide)
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : CompleteCheckList
|
||||
//purpose :
|
||||
@@ -261,11 +111,11 @@ void Interface_CheckTool::CheckSuccess (const Standard_Boolean reset)
|
||||
Interface_CheckIterator Interface_CheckTool::CompleteCheckList ()
|
||||
{
|
||||
thestat = 3;
|
||||
Handle(Interface_InterfaceModel) model = theshare.Model();
|
||||
const Handle(Interface_InterfaceModel) &model = Graph().Model();
|
||||
Interface_CheckIterator res;
|
||||
res.SetModel(model);
|
||||
Handle(Interface_Check) globch = model->GlobalCheck(); // GlobalCheck Statique
|
||||
if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (theshare.Graph(),globch);
|
||||
if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (Graph(),globch);
|
||||
model->VerifyCheck(globch); // GlobalCheck Dynamique
|
||||
if (globch->HasFailed() || globch->HasWarnings()) res.Add(globch,0);
|
||||
if (globch->HasFailed()) thestat |= 12;
|
||||
@@ -286,7 +136,7 @@ Interface_CheckIterator Interface_CheckTool::CompleteCheckList ()
|
||||
if (ach->HasFailed()) // FAIL : pas de Check semantique
|
||||
{ res.Add(ach,i); ach = new Interface_Check; thestat |= 12; continue; }
|
||||
}
|
||||
if (!model->HasSemanticChecks()) FillCheck(ent,theshare,ach);
|
||||
if (!model->HasSemanticChecks()) FillCheck(ent,ach);
|
||||
else ach->GetMessages (model->Check (i,Standard_False));
|
||||
if (ach->HasFailed() || ach->HasWarnings())
|
||||
{ res.Add(ach,i); ach = new Interface_Check; if (ach->HasFailed()) thestat |= 12; }
|
||||
@@ -305,7 +155,6 @@ Interface_CheckIterator Interface_CheckTool::CompleteCheckList ()
|
||||
|
||||
// CheckList : Check Fail sur Entites, en Analyse (Read time) ou Verify
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : CheckList
|
||||
//purpose :
|
||||
@@ -314,12 +163,12 @@ Interface_CheckIterator Interface_CheckTool::CompleteCheckList ()
|
||||
Interface_CheckIterator Interface_CheckTool::CheckList ()
|
||||
{
|
||||
thestat = 3;
|
||||
Handle(Interface_InterfaceModel) model = theshare.Model();
|
||||
const Handle(Interface_InterfaceModel) &model = Graph().Model();
|
||||
Interface_CheckIterator res;
|
||||
res.SetModel(model);
|
||||
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
|
||||
Handle(Interface_Check) globch = model->GlobalCheck();
|
||||
if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (theshare.Graph(),globch);
|
||||
if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (Graph(),globch);
|
||||
model->VerifyCheck(globch);
|
||||
if (globch->HasFailed()) { thestat |= 12; res.Add(globch,0); }
|
||||
|
||||
@@ -338,7 +187,7 @@ Interface_CheckIterator Interface_CheckTool::CheckList ()
|
||||
ent = model->Value(i);
|
||||
ach->Clear();
|
||||
ach->SetEntity(ent);
|
||||
if (!model->HasSemanticChecks()) FillCheck(ent,theshare,ach);
|
||||
if (!model->HasSemanticChecks()) FillCheck(ent,ach);
|
||||
else ach = model->Check (i,Standard_False);
|
||||
if (ach->HasFailed()) { thestat |= 12; res.Add(ach,i); }
|
||||
}
|
||||
@@ -366,7 +215,7 @@ Interface_CheckIterator Interface_CheckTool::CheckList ()
|
||||
Interface_CheckIterator Interface_CheckTool::AnalyseCheckList ()
|
||||
{
|
||||
thestat = 2;
|
||||
Handle(Interface_InterfaceModel) model = theshare.Model();
|
||||
const Handle(Interface_InterfaceModel) &model = Graph().Model();
|
||||
Interface_CheckIterator res;
|
||||
res.SetModel(model);
|
||||
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
|
||||
@@ -377,11 +226,10 @@ Interface_CheckIterator Interface_CheckTool::AnalyseCheckList ()
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
for (i = n0; i <= nb; i ++) {
|
||||
if (!model->IsReportEntity(i)) continue;
|
||||
Handle(Interface_ReportEntity) rep = model->ReportEntity(i);
|
||||
ach = rep->Check();
|
||||
if (ach->HasFailed() || ach->HasWarnings())
|
||||
{ thestat |= 8; res.Add(ach,i); }
|
||||
if (!model->IsReportEntity(i)) continue;
|
||||
ach = model->ReportEntity(i)->Check();
|
||||
if (ach->HasFailed() || ach->HasWarnings())
|
||||
{ thestat |= 8; res.Add(ach,i); }
|
||||
}
|
||||
n0 = nb+1;
|
||||
}
|
||||
@@ -406,7 +254,7 @@ Interface_CheckIterator Interface_CheckTool::AnalyseCheckList ()
|
||||
Interface_CheckIterator Interface_CheckTool::VerifyCheckList ()
|
||||
{
|
||||
thestat = 1;
|
||||
Handle(Interface_InterfaceModel) model = theshare.Model();
|
||||
const Handle(Interface_InterfaceModel) &model = Graph().Model();
|
||||
Interface_CheckIterator res;
|
||||
res.SetModel(model);
|
||||
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
|
||||
@@ -418,14 +266,14 @@ Interface_CheckIterator Interface_CheckTool::VerifyCheckList ()
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
for (i = n0; i <= nb; i ++) {
|
||||
if (model->IsErrorEntity(i)) continue;
|
||||
ent = model->Value(i);
|
||||
ach->Clear();
|
||||
ach->SetEntity(ent);
|
||||
if (!model->HasSemanticChecks()) FillCheck(ent,theshare,ach);
|
||||
else ach = model->Check (i,Standard_False);
|
||||
if (ach->HasFailed() || ach->HasWarnings())
|
||||
{ thestat |= 4; res.Add(ach,i); }
|
||||
if (model->IsErrorEntity(i)) continue;
|
||||
ent = model->Value(i);
|
||||
ach->Clear();
|
||||
ach->SetEntity(ent);
|
||||
if (!model->HasSemanticChecks()) FillCheck(ent,ach);
|
||||
else ach = model->Check (i,Standard_False);
|
||||
if (ach->HasFailed() || ach->HasWarnings())
|
||||
{ thestat |= 4; res.Add(ach,i); }
|
||||
}
|
||||
n0 = nb+1;
|
||||
}
|
||||
@@ -438,68 +286,36 @@ Interface_CheckIterator Interface_CheckTool::VerifyCheckList ()
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
// Warnings sur Entites (Read time ou apres)
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : WarningCheckList
|
||||
//function : FillCheck
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Interface_CheckIterator Interface_CheckTool::WarningCheckList ()
|
||||
void Interface_CheckTool::FillCheck(const Handle(Standard_Transient)& ent,
|
||||
Handle(Interface_Check)& ach)
|
||||
{
|
||||
thestat = 3;
|
||||
Handle(Interface_InterfaceModel) model = theshare.Model();
|
||||
Interface_CheckIterator res;
|
||||
res.SetModel(model);
|
||||
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
|
||||
|
||||
errh = 0;
|
||||
while (n0 <= nb) {
|
||||
Handle(Interface_Check) ach = new Interface_Check;
|
||||
Handle(Standard_Transient) ent;
|
||||
Handle(Interface_GeneralModule) module;
|
||||
Standard_Integer CN;
|
||||
if (thegtool->Select(ent,module,CN)) {
|
||||
// Sans try/catch (fait par l appelant, evite try/catch en boucle)
|
||||
if (!errh) {
|
||||
module->CheckCase(CN,ent,*this,ach);
|
||||
return;
|
||||
}
|
||||
// Avec try/catch
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
for (i = n0; i <= nb; i ++) {
|
||||
ach->Clear();
|
||||
ach->SetEntity (ent);
|
||||
if (model->IsReportEntity(i)) {
|
||||
Handle(Interface_ReportEntity) rep = model->ReportEntity(i);
|
||||
if (rep->IsError()) { thestat |= 12; continue; }
|
||||
ach = rep->Check();
|
||||
}
|
||||
ent = model->Value(i);
|
||||
if (!model->HasSemanticChecks()) FillCheck(ent,theshare,ach);
|
||||
else ach = model->Check (i,Standard_False);
|
||||
if (ach->HasFailed()) thestat |= 12;
|
||||
else if (ach->HasWarnings()) res.Add(ach,i);
|
||||
}
|
||||
n0 = nb+1;
|
||||
module->CheckCase(CN,ent,*this,ach);
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
n0 = i+1;
|
||||
catch (Standard_Failure) {
|
||||
raisecheck(ach);
|
||||
res.Add(ach,i); thestat |= 12;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : UnknownEntities
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Interface_EntityIterator Interface_CheckTool::UnknownEntities ()
|
||||
{
|
||||
Handle(Interface_InterfaceModel) model = theshare.Model();
|
||||
Interface_EntityIterator res;
|
||||
Standard_Integer nb = model->NbEntities();
|
||||
for (Standard_Integer i = 1; i <= nb; i ++) {
|
||||
if (model->IsUnknownEntity(i)) res.GetOneItem(model->Value(i));
|
||||
else {
|
||||
DeclareAndCast(Interface_ReportEntity,rep,ent);
|
||||
if (rep.IsNull()) return;
|
||||
ach = rep->Check();
|
||||
}
|
||||
return res;
|
||||
if (Graph().HasShareErrors(ent))
|
||||
ach->AddFail("** Shared Items unknown from the containing Model");
|
||||
}
|
||||
|
@@ -22,72 +22,35 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Interface_ShareTool.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_GTool;
|
||||
class Interface_CheckFailure;
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_Protocol;
|
||||
class Interface_Graph;
|
||||
class Interface_HGraph;
|
||||
class Standard_Transient;
|
||||
class Interface_ShareTool;
|
||||
class Interface_Check;
|
||||
class Message_Messenger;
|
||||
class Interface_CheckIterator;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
//! Performs Checks on Entities, using General Service Library and
|
||||
//! Modules to work. Works on one Entity or on a complete Model
|
||||
class Interface_CheckTool
|
||||
class Interface_CheckTool : public Interface_ShareTool
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a CheckTool, by calling the General Service Library
|
||||
//! and Modules, selected through a Protocol, to work on a Model
|
||||
//! Moreover, Protocol recognizes Unknown Entities
|
||||
Standard_EXPORT Interface_CheckTool(const Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol);
|
||||
|
||||
//! Creates a CheckTool, by calling the General Service Library
|
||||
//! and Modules, selected through a Protocol, to work on a Model
|
||||
//! Protocol and so on are taken from the Model (its GTool)
|
||||
Standard_EXPORT Interface_CheckTool(const Handle(Interface_InterfaceModel)& model);
|
||||
|
||||
//! Creates a CheckTool from a Graph. The Graph contains a Model
|
||||
//! which designates a Protocol: they are used to create ShareTool
|
||||
Standard_EXPORT Interface_CheckTool(const Interface_Graph& graph);
|
||||
|
||||
Standard_EXPORT Interface_CheckTool(const Handle(Interface_HGraph)& hgraph);
|
||||
|
||||
//! Fills as required a Check with the Error and Warning messages
|
||||
//! produced by Checking a given Entity.
|
||||
//! For an Erroneous or Corrected Entity : Check build at Analyse
|
||||
//! time; else, Check computed for Entity (Verify integrity), can
|
||||
//! use a Graph as required to control context
|
||||
Standard_EXPORT void FillCheck (const Handle(Standard_Transient)& ent, const Interface_ShareTool& sh, Handle(Interface_Check)& ach);
|
||||
|
||||
//! Utility method which Prints the content of a Check
|
||||
Standard_EXPORT void Print (const Handle(Interface_Check)& ach, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
//! Simply Lists all the Checks and the Content (messages) and the
|
||||
//! Entity, if there is, of each Check
|
||||
//! (if all Checks are OK, nothing is Printed)
|
||||
Standard_EXPORT void Print (const Interface_CheckIterator& list, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
//! Returns the Check associated to an Entity identified by
|
||||
//! its Number in a Model.
|
||||
Standard_EXPORT Handle(Interface_Check) Check (const Standard_Integer num);
|
||||
|
||||
//! Checks if any Error has been detected (CheckList not empty)
|
||||
//! Returns normally if none, raises exception if some exists.
|
||||
//! It reuses the last computations from other checking methods,
|
||||
//! unless the argument <resest> is given True
|
||||
Standard_EXPORT void CheckSuccess (const Standard_Boolean reset = Standard_False);
|
||||
|
||||
//! Returns list of all "remarkable" informations, which include :
|
||||
//! - GlobalCheck, if not empty
|
||||
//! - Error Checks, for all Errors (Verify + Analyse)
|
||||
@@ -111,38 +74,17 @@ public:
|
||||
//! (note that GlobalCheck is not in this list)
|
||||
Standard_EXPORT Interface_CheckIterator VerifyCheckList();
|
||||
|
||||
//! Returns list of Corrections (includes GlobalCheck if corrected)
|
||||
Standard_EXPORT Interface_CheckIterator WarningCheckList();
|
||||
|
||||
//! Returns list of Unknown Entities
|
||||
//! Note that Error and Erroneous Entities are not considered
|
||||
//! as Unknown
|
||||
Standard_EXPORT Interface_EntityIterator UnknownEntities();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
//! Fills as required a Check with the Error and Warning messages
|
||||
//! produced by Checking a given Entity.
|
||||
//! For an Erroneous or Corrected Entity : Check build at Analyse
|
||||
//! time; else, Check computed for Entity (Verify integrity), can
|
||||
//! use a Graph as required to control context
|
||||
Standard_EXPORT void FillCheck (const Handle(Standard_Transient)& ent, Handle(Interface_Check)& ach);
|
||||
|
||||
Handle(Interface_GTool) thegtool;
|
||||
Interface_ShareTool theshare;
|
||||
Standard_Integer thestat;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Interface_CheckTool_HeaderFile
|
||||
|
@@ -13,69 +13,42 @@
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_IntVal.hxx>
|
||||
#include <Standard_NoMoreObject.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
// Iterateur pour ecriture for, ou while avec Next en fin :
|
||||
// for (creer iterateur; iter.More(); iter.Next()) { val = iter.Value(); ... }
|
||||
// .... Definitions initiales : en particulier celles requises pour
|
||||
// les outils de graphe (construction avec le graphe, avec un vertex)
|
||||
Interface_EntityIterator::Interface_EntityIterator ()
|
||||
Interface_EntityIterator::Interface_EntityIterator (const Handle(TColStd_HSequenceOfTransient)& list)
|
||||
{
|
||||
// thecurr = new Interface_IntVal;
|
||||
// thecurr->CValue() = 0;
|
||||
// thelist = new TColStd_HSequenceOfTransient(); // constructeur vide
|
||||
// thelist sera construit au premier Add (quelquefois, il nyena pas)
|
||||
}
|
||||
|
||||
Interface_EntityIterator::Interface_EntityIterator
|
||||
(const Handle(TColStd_HSequenceOfTransient)& list)
|
||||
{
|
||||
thecurr = new Interface_IntVal;
|
||||
thecurr->CValue() = 0;
|
||||
thecurr = 0;
|
||||
thelist = list;
|
||||
}
|
||||
|
||||
void Interface_EntityIterator::AddList
|
||||
(const Handle(TColStd_HSequenceOfTransient)& list)
|
||||
void Interface_EntityIterator::AddList (const Handle(TColStd_HSequenceOfTransient)& list)
|
||||
{
|
||||
if (thelist.IsNull()) thelist = new TColStd_HSequenceOfTransient();
|
||||
if (thecurr.IsNull()) thecurr = new Interface_IntVal;
|
||||
thecurr->CValue() = 0;
|
||||
thecurr = 0;
|
||||
thelist->Append(list);
|
||||
}
|
||||
|
||||
void Interface_EntityIterator::AddItem
|
||||
(const Handle(Standard_Transient)& anentity)
|
||||
void Interface_EntityIterator::AddItem (const Handle(Standard_Transient)& anentity)
|
||||
{
|
||||
if (anentity.IsNull()) return;
|
||||
if (thecurr.IsNull()) thecurr = new Interface_IntVal;
|
||||
if (thelist.IsNull()) thelist = new TColStd_HSequenceOfTransient();
|
||||
thecurr->CValue() = 0;
|
||||
thecurr = 0;
|
||||
thelist->Append(anentity);
|
||||
}
|
||||
|
||||
void Interface_EntityIterator::GetOneItem
|
||||
(const Handle(Standard_Transient)& anentity)
|
||||
{ AddItem(anentity); }
|
||||
|
||||
void Interface_EntityIterator::Reset ()
|
||||
void Interface_EntityIterator::Reset ()
|
||||
{
|
||||
if (thecurr.IsNull()) thecurr = new Interface_IntVal;
|
||||
thecurr->CValue() = 0;
|
||||
thecurr = 0;
|
||||
thelist = new TColStd_HSequenceOfTransient();
|
||||
}
|
||||
|
||||
|
||||
// .... Fonctionnalites de tri prealable a l'iteration ....
|
||||
|
||||
// Facon "bete" : supprimer les termes qui ne conviennent pas : lent !
|
||||
// Mieux vaut refaire une autre sequence a cote
|
||||
|
||||
void Interface_EntityIterator::SelectType
|
||||
(const Handle(Standard_Type)& atype, const Standard_Boolean keep)
|
||||
void Interface_EntityIterator::SelectType (const Handle(Standard_Type)& atype, const Standard_Boolean keep)
|
||||
{
|
||||
if (thelist.IsNull()) return;
|
||||
Standard_Integer i, n = thelist->Length();
|
||||
@@ -88,15 +61,12 @@ Interface_EntityIterator::Interface_EntityIterator ()
|
||||
|
||||
// .... Iteration proprement dite ....
|
||||
|
||||
Standard_Integer Interface_EntityIterator::NbEntities () const
|
||||
Standard_Integer Interface_EntityIterator::NbEntities () const
|
||||
{
|
||||
if (thelist.IsNull()) return 0;
|
||||
if (!thecurr.IsNull() && thecurr->Value() == 0) Start();
|
||||
return thelist->Length();
|
||||
return thelist.IsNull()? 0 : thelist->Length();
|
||||
}
|
||||
|
||||
Standard_Integer Interface_EntityIterator::NbTyped
|
||||
(const Handle(Standard_Type)& atype) const
|
||||
Standard_Integer Interface_EntityIterator::NbTyped (const Handle(Standard_Type)& atype) const
|
||||
{
|
||||
Standard_Integer res = 0;
|
||||
if (thelist.IsNull()) return res;
|
||||
@@ -107,8 +77,7 @@ Interface_EntityIterator::Interface_EntityIterator ()
|
||||
return res;
|
||||
}
|
||||
|
||||
Interface_EntityIterator Interface_EntityIterator::Typed
|
||||
(const Handle(Standard_Type)& atype) const
|
||||
Interface_EntityIterator Interface_EntityIterator::Typed (const Handle(Standard_Type)& atype) const
|
||||
{
|
||||
Interface_EntityIterator res;
|
||||
if (thelist.IsNull()) return res;
|
||||
@@ -119,42 +88,28 @@ Interface_EntityIterator::Interface_EntityIterator ()
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
void Interface_EntityIterator::Start () const
|
||||
{ if (!thecurr.IsNull()) thecurr->CValue() = 1 ; } // peut etre redefini ...
|
||||
|
||||
Standard_Boolean Interface_EntityIterator::More () const
|
||||
void Interface_EntityIterator::Start () const
|
||||
{
|
||||
if (thecurr.IsNull()) return Standard_False;
|
||||
if (thecurr->Value() == 0) Start(); // preparation de l iteration
|
||||
if (thelist.IsNull()) return Standard_False;
|
||||
return (thecurr->Value() <= thelist->Length());
|
||||
thecurr = 1;
|
||||
}
|
||||
|
||||
void Interface_EntityIterator::Next () const
|
||||
{ thecurr->CValue() ++; } // Next ne verifie rien : soin laisse a Value
|
||||
|
||||
const Handle(Standard_Transient)& Interface_EntityIterator::Value () const
|
||||
Standard_Boolean Interface_EntityIterator::More () const
|
||||
{
|
||||
// NbEntity pas const (on ne sait pas comment il est implemente apres tout)
|
||||
if (thelist.IsNull()) Standard_NoSuchObject::Raise("Interface_EntityIterator");
|
||||
if (thecurr->Value() < 1 || thecurr->Value() > thelist->Length())
|
||||
if (thecurr == 0) Start(); // preparation de l iteration
|
||||
return thelist.IsNull()? Standard_False : (thecurr <= thelist->Length());
|
||||
}
|
||||
|
||||
const Handle(Standard_Transient)& Interface_EntityIterator::Value () const
|
||||
{
|
||||
// NbEntity pas const (on ne sait pas comment il est implemente apres tout)
|
||||
if (thelist.IsNull())
|
||||
Standard_NoSuchObject::Raise("Interface_EntityIterator");
|
||||
return thelist->Value(thecurr->Value());
|
||||
if (thecurr < 1 || thecurr > thelist->Length())
|
||||
Standard_NoSuchObject::Raise("Interface_EntityIterator");
|
||||
return thelist->Value(thecurr);
|
||||
}
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) Interface_EntityIterator::Content () const
|
||||
Handle(TColStd_HSequenceOfTransient) Interface_EntityIterator::Content () const
|
||||
{
|
||||
if (!thecurr.IsNull() && thecurr->Value() == 0) Start();
|
||||
if (thelist.IsNull()) return new TColStd_HSequenceOfTransient(); // vide
|
||||
return thelist;
|
||||
return (thelist.IsNull()? new TColStd_HSequenceOfTransient() : thelist);
|
||||
}
|
||||
|
||||
void Interface_EntityIterator::Destroy ()
|
||||
{ thecurr.Nullify(); } // redevient vide !
|
||||
|
||||
Interface_EntityIterator::~Interface_EntityIterator()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
@@ -23,25 +23,18 @@
|
||||
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Interface_IntVal;
|
||||
class Standard_NoMoreObject;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
//! Defines an Iterator on Entities.
|
||||
//! Allows considering of various criteria
|
||||
class Interface_EntityIterator
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Defines an empty iterator (see AddList & AddItem)
|
||||
Standard_EXPORT Interface_EntityIterator();
|
||||
Interface_EntityIterator() {}
|
||||
|
||||
//! Defines an iterator on a list, directly i.e. without copying it
|
||||
Standard_EXPORT Interface_EntityIterator(const Handle(TColStd_HSequenceOfTransient)& list);
|
||||
@@ -53,7 +46,7 @@ public:
|
||||
Standard_EXPORT void AddItem (const Handle(Standard_Transient)& anentity);
|
||||
|
||||
//! same as AddItem (kept for compatibility)
|
||||
Standard_EXPORT void GetOneItem (const Handle(Standard_Transient)& anentity);
|
||||
void GetOneItem (const Handle(Standard_Transient)& anentity) { AddItem(anentity); }
|
||||
|
||||
//! Selects entities with are Kind of a given type, keep only
|
||||
//! them (is keep is True) or reject only them (if keep is False)
|
||||
@@ -77,7 +70,7 @@ public:
|
||||
Standard_EXPORT Standard_Boolean More() const;
|
||||
|
||||
//! Sets iteration to the next entity (vertex) to give
|
||||
Standard_EXPORT void Next() const;
|
||||
void Next() const { thecurr++; } // Next ne verifie rien : soin laisse a Value
|
||||
|
||||
//! Returns the current Entity iterated, to be used by Interface
|
||||
//! tools
|
||||
@@ -89,35 +82,18 @@ public:
|
||||
//! Calls Start if not yet done
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Content() const;
|
||||
|
||||
//! Clears data of iteration
|
||||
Standard_EXPORT void Destroy();
|
||||
|
||||
//! Destructor
|
||||
Standard_EXPORT virtual ~Interface_EntityIterator();
|
||||
|
||||
protected:
|
||||
Standard_EXPORT virtual ~Interface_EntityIterator() {}
|
||||
|
||||
protected:
|
||||
|
||||
//! Allows subclasses of EntityIterator to reevaluate an iteration
|
||||
Standard_EXPORT void Reset();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Interface_IntVal) thecurr;
|
||||
mutable Standard_Integer thecurr;
|
||||
Handle(TColStd_HSequenceOfTransient) thelist;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Interface_EntityIterator_HeaderFile
|
||||
|
@@ -14,7 +14,6 @@
|
||||
// dce 21/01/99 S3767 : Suppression of general messages
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_CheckFailure.hxx>
|
||||
#include <Interface_FileReaderData.hxx>
|
||||
#include <Interface_FileReaderTool.hxx>
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
|
@@ -38,53 +38,6 @@
|
||||
|
||||
// .... CONSTRUCTEURS ....
|
||||
|
||||
// .... Construction a partir de la connaissance des Entites ....
|
||||
|
||||
|
||||
Interface_Graph::Interface_Graph
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Interface_GeneralLib& /*lib*/,
|
||||
Standard_Boolean theModeStat)
|
||||
: themodel (amodel), thepresents ("")
|
||||
{
|
||||
if(theModeStat)
|
||||
InitStats();
|
||||
Evaluate();
|
||||
}
|
||||
|
||||
Interface_Graph::Interface_Graph
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Handle(Interface_Protocol)& /*protocol*/,
|
||||
Standard_Boolean theModeStat)
|
||||
: themodel (amodel) , thepresents ("")
|
||||
|
||||
{
|
||||
if(theModeStat)
|
||||
InitStats();
|
||||
Evaluate();
|
||||
}
|
||||
|
||||
Interface_Graph::Interface_Graph
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Handle(Interface_GTool)& /*gtool*/,
|
||||
Standard_Boolean theModeStat)
|
||||
: themodel (amodel) , thepresents ("")
|
||||
{
|
||||
if(theModeStat)
|
||||
InitStats();
|
||||
Evaluate();
|
||||
}
|
||||
|
||||
Interface_Graph::Interface_Graph
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
Standard_Boolean theModeStat)
|
||||
: themodel (amodel) , thepresents ("")
|
||||
{
|
||||
if(theModeStat)
|
||||
InitStats();
|
||||
Evaluate ();
|
||||
}
|
||||
|
||||
// .... Construction depuis un autre Graph ....
|
||||
|
||||
Interface_Graph::Interface_Graph
|
||||
@@ -253,19 +206,10 @@ void Interface_Graph::RemoveStatus(const Standard_Integer stat)
|
||||
}
|
||||
}
|
||||
|
||||
const Interface_BitMap& Interface_Graph::BitMap () const
|
||||
{ return theflags; }
|
||||
|
||||
Interface_BitMap& Interface_Graph::CBitMap ()
|
||||
{ return theflags; }
|
||||
|
||||
// ###########################################################################
|
||||
|
||||
// .... Chargements Elementaires avec Propagation de "Share" .... //
|
||||
|
||||
const Handle(Interface_InterfaceModel)& Interface_Graph::Model() const
|
||||
{ return themodel; }
|
||||
|
||||
void Interface_Graph::GetFromModel ()
|
||||
{
|
||||
if (themodel.IsNull() || thestats.IsNull())
|
||||
|
@@ -29,8 +29,6 @@
|
||||
#include <TColStd_HArray1OfListOfInteger.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
|
||||
class Interface_InterfaceModel;
|
||||
class Standard_DomainError;
|
||||
class Interface_GeneralLib;
|
||||
class Interface_Protocol;
|
||||
class Interface_GTool;
|
||||
@@ -69,18 +67,13 @@ public:
|
||||
//! Creates an empty graph, ready to receive Entities from amodel
|
||||
//! Note that this way of Creation allows <me> to verify that
|
||||
//! Entities to work with are contained in <amodel>
|
||||
//! Basic Shared and Sharing lists are obtained from a General
|
||||
//! Services Library, given directly as an argument
|
||||
Standard_EXPORT Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib, const Standard_Boolean theModeStats = Standard_True);
|
||||
|
||||
//! Same as above, but the Library is defined through a Protocol
|
||||
Standard_EXPORT Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol, const Standard_Boolean theModeStats = Standard_True);
|
||||
|
||||
//! Same as above, but the Library is defined through a Protocol
|
||||
Standard_EXPORT Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_GTool)& gtool, const Standard_Boolean theModeStats = Standard_True);
|
||||
|
||||
//! Same a above but works with the Protocol recorded in the Model
|
||||
Standard_EXPORT Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, const Standard_Boolean theModeStats = Standard_True);
|
||||
Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, const Standard_Boolean theModeStats = Standard_True)
|
||||
: themodel (amodel), thepresents ("")
|
||||
{
|
||||
if(theModeStats)
|
||||
InitStats();
|
||||
Evaluate();
|
||||
}
|
||||
|
||||
//! Creates a Graph from another one, getting all its data
|
||||
//! Remark that status are copied from <agraph>, but the other
|
||||
@@ -136,13 +129,13 @@ public:
|
||||
Standard_EXPORT void RemoveStatus (const Standard_Integer stat);
|
||||
|
||||
//! Returns the Bit Map in order to read or edit flag values
|
||||
Standard_EXPORT const Interface_BitMap& BitMap() const;
|
||||
const Interface_BitMap& BitMap() const { return theflags; }
|
||||
|
||||
//! Returns the Bit Map in order to edit it (add new flags)
|
||||
Standard_EXPORT Interface_BitMap& CBitMap();
|
||||
Interface_BitMap& CBitMap() { return theflags; }
|
||||
|
||||
//! Returns the Model with which this Graph was created
|
||||
Standard_EXPORT const Handle(Interface_InterfaceModel)& Model() const;
|
||||
const Handle(Interface_InterfaceModel)& Model() const { return themodel; }
|
||||
|
||||
//! Loads Graph with all Entities contained in the Model
|
||||
Standard_EXPORT void GetFromModel();
|
||||
@@ -229,24 +222,17 @@ public:
|
||||
//! Returns mode resposible for computation of statuses;
|
||||
Standard_EXPORT Standard_Boolean ModeStat() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
|
||||
//! Initialize statuses and flags
|
||||
Standard_EXPORT void InitStats();
|
||||
|
||||
|
||||
Handle(Interface_InterfaceModel) themodel;
|
||||
TCollection_AsciiString thepresents;
|
||||
Handle(TColStd_HArray1OfInteger) thestats;
|
||||
Handle(TColStd_HArray1OfListOfInteger) thesharings;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
//! Performs the Evaluation of the Graph, from an initial Library,
|
||||
//! either defined through a Protocol, or given dierctly
|
||||
@@ -257,16 +243,7 @@ private:
|
||||
//! If <gtool> is defined, it has priority
|
||||
Standard_EXPORT void Evaluate();
|
||||
|
||||
|
||||
Interface_BitMap theflags;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Interface_Graph_HeaderFile
|
||||
|
@@ -19,18 +19,7 @@
|
||||
#include <Interface_IntList.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
Interface_GraphContent::Interface_GraphContent () { }
|
||||
|
||||
Interface_GraphContent::Interface_GraphContent
|
||||
(const Interface_Graph& agraph)
|
||||
{ GetFromGraph(agraph); }
|
||||
|
||||
Interface_GraphContent::Interface_GraphContent
|
||||
(const Interface_Graph& agraph, const Standard_Integer stat)
|
||||
{ GetFromGraph(agraph,stat); }
|
||||
|
||||
Interface_GraphContent::Interface_GraphContent
|
||||
(const Interface_Graph& agraph, const Handle(Standard_Transient)& ent)
|
||||
Interface_GraphContent::Interface_GraphContent (const Interface_Graph& agraph, const Handle(Standard_Transient)& ent)
|
||||
{
|
||||
Interface_EntityIterator list = agraph.Shareds(ent);
|
||||
Standard_Integer nb = list.NbEntities();
|
||||
@@ -42,8 +31,7 @@ Interface_GraphContent::Interface_GraphContent () { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Interface_GraphContent::GetFromGraph (const Interface_Graph& agraph)
|
||||
void Interface_GraphContent::GetFromGraph (const Interface_Graph& agraph)
|
||||
{
|
||||
Standard_Integer nb = agraph.Size();
|
||||
for (Standard_Integer i = 1; i <= nb; i ++) {
|
||||
@@ -51,8 +39,7 @@ Interface_GraphContent::Interface_GraphContent () { }
|
||||
}
|
||||
}
|
||||
|
||||
void Interface_GraphContent::GetFromGraph
|
||||
(const Interface_Graph& agraph, const Standard_Integer stat)
|
||||
void Interface_GraphContent::GetFromGraph (const Interface_Graph& agraph, const Standard_Integer stat)
|
||||
{
|
||||
Standard_Integer nb = agraph.Size();
|
||||
for (Standard_Integer i = 1; i <= nb; i ++) {
|
||||
@@ -61,19 +48,18 @@ Interface_GraphContent::Interface_GraphContent () { }
|
||||
}
|
||||
}
|
||||
|
||||
Interface_EntityIterator Interface_GraphContent::Result ()
|
||||
Interface_EntityIterator Interface_GraphContent::Result ()
|
||||
{
|
||||
Interface_EntityIterator iter; // On transvase ...
|
||||
for (Begin(); More(); Next()) iter.GetOneItem(Value());
|
||||
return iter;
|
||||
}
|
||||
|
||||
|
||||
void Interface_GraphContent::Begin ()
|
||||
void Interface_GraphContent::Begin ()
|
||||
{
|
||||
Evaluate();
|
||||
Interface_EntityIterator::Start();
|
||||
}
|
||||
|
||||
void Interface_GraphContent::Evaluate ()
|
||||
{ } // par defaut, Evaluate ne fait rien
|
||||
void Interface_GraphContent::Evaluate ()
|
||||
{}
|
||||
|
@@ -35,19 +35,20 @@ class Interface_EntityIterator;
|
||||
//! all being given under one unique form
|
||||
class Interface_GraphContent : public Interface_EntityIterator
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates an empty GraphContent, ready to be filled
|
||||
Standard_EXPORT Interface_GraphContent();
|
||||
Interface_GraphContent() {}
|
||||
|
||||
//! Creates with all entities designated by a Graph
|
||||
Standard_EXPORT Interface_GraphContent(const Interface_Graph& agraph);
|
||||
Interface_GraphContent(const Interface_Graph& agraph)
|
||||
{ GetFromGraph(agraph); }
|
||||
|
||||
//! Creates with entities having specific Status value in a Graph
|
||||
Standard_EXPORT Interface_GraphContent(const Interface_Graph& agraph, const Standard_Integer stat);
|
||||
Interface_GraphContent(const Interface_Graph& agraph, const Standard_Integer stat)
|
||||
{ GetFromGraph(agraph,stat); }
|
||||
|
||||
//! Creates an Iterator with Shared entities of an entity
|
||||
//! (equivalente to EntityIterator but with a Graph)
|
||||
@@ -74,28 +75,6 @@ public:
|
||||
//! Default is set to doing nothing : intended to be redefined
|
||||
//! by each sub-class
|
||||
Standard_EXPORT virtual void Evaluate();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Interface_GraphContent_HeaderFile
|
||||
|
@@ -11,52 +11,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_GTool.hxx>
|
||||
#include <Interface_HGraph.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Interface_HGraph,MMgt_TShared)
|
||||
|
||||
Interface_HGraph::Interface_HGraph (const Interface_Graph& agraph)
|
||||
: thegraph(agraph) { }
|
||||
|
||||
|
||||
Interface_HGraph::Interface_HGraph
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Interface_GeneralLib& lib,
|
||||
const Standard_Boolean theModeStat)
|
||||
: thegraph (amodel,lib,theModeStat) { }
|
||||
|
||||
|
||||
Interface_HGraph::Interface_HGraph
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Handle(Interface_Protocol)& protocol,
|
||||
const Standard_Boolean theModeStat)
|
||||
: thegraph (amodel,protocol,theModeStat) { }
|
||||
|
||||
|
||||
Interface_HGraph::Interface_HGraph
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Handle(Interface_GTool)& gtool,
|
||||
const Standard_Boolean theModeStat)
|
||||
: thegraph (amodel,gtool,theModeStat) { }
|
||||
|
||||
|
||||
Interface_HGraph::Interface_HGraph
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Standard_Boolean theModeStat)
|
||||
: thegraph (amodel,theModeStat) { }
|
||||
|
||||
|
||||
const Interface_Graph& Interface_HGraph::Graph () const
|
||||
{ return thegraph; }
|
||||
|
||||
|
||||
Interface_Graph& Interface_HGraph::CGraph ()
|
||||
{ return thegraph; }
|
||||
|
@@ -19,17 +19,10 @@
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_DomainError;
|
||||
class Interface_Graph;
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_GeneralLib;
|
||||
class Interface_Protocol;
|
||||
class Interface_GTool;
|
||||
|
||||
|
||||
class Interface_HGraph;
|
||||
DEFINE_STANDARD_HANDLE(Interface_HGraph, MMgt_TShared)
|
||||
@@ -39,60 +32,34 @@ DEFINE_STANDARD_HANDLE(Interface_HGraph, MMgt_TShared)
|
||||
//! Models, with the same general conditions)
|
||||
class Interface_HGraph : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
//! Creates an HGraph directly from a Graph.
|
||||
//! Remark that the starting Graph is duplicated
|
||||
Standard_EXPORT Interface_HGraph(const Interface_Graph& agraph);
|
||||
Interface_HGraph(const Interface_Graph& agraph)
|
||||
: thegraph (agraph)
|
||||
{}
|
||||
|
||||
//! Creates an HGraph with a Graph created from <amodel> and <lib>
|
||||
Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib, const Standard_Boolean theModeStats = Standard_True);
|
||||
|
||||
//! Creates an HGraph with a graph itself created from <amodel>
|
||||
//! and <protocol>
|
||||
Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol, const Standard_Boolean theModeStats = Standard_True);
|
||||
|
||||
//! Creates an HGraph with a graph itself created from <amodel>
|
||||
//! and <protocol>
|
||||
Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_GTool)& gtool, const Standard_Boolean theModeStats = Standard_True);
|
||||
|
||||
//! Same a above, but works with the GTool in the model
|
||||
Standard_EXPORT Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Standard_Boolean theModeStats = Standard_True);
|
||||
//! Creates an HGraph with a Graph created from <amodel>, works with the GTool in the model
|
||||
Interface_HGraph(const Handle(Interface_InterfaceModel)& amodel, const Standard_Boolean theModeStats = Standard_True)
|
||||
: thegraph (amodel,theModeStats)
|
||||
{}
|
||||
|
||||
//! Returns the Graph contained in <me>, for Read Only Operations
|
||||
//! Remark that it is returns as "const &"
|
||||
//! Getting it in a new variable instead of a reference would be
|
||||
//! a pitty, because all the graph's content would be duplicated
|
||||
Standard_EXPORT const Interface_Graph& Graph() const;
|
||||
const Interface_Graph& Graph() const { return thegraph; }
|
||||
|
||||
//! Same as above, but for Read-Write Operations
|
||||
//! Then, The Graph will be modified in the HGraph itself
|
||||
Standard_EXPORT Interface_Graph& CGraph();
|
||||
|
||||
|
||||
|
||||
Interface_Graph& CGraph() { return thegraph; }
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(Interface_HGraph,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
Interface_Graph thegraph;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Interface_HGraph_HeaderFile
|
||||
|
@@ -41,27 +41,6 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Interface_InterfaceModel,MMgt_TShared)
|
||||
|
||||
// Un Modele d`Interface est un ensemble ferme d`Entites d`interface : chacune
|
||||
// est dans un seul modele a la fois; elle y a un numero (Number) qui permet de
|
||||
// verifier qu`une entite est bien dans un seul modele, de definir des Map tres
|
||||
// performantes, de fournir un identifieur numerique
|
||||
// Il est a meme d`etre utilise dans des traitements de Graphe
|
||||
// STATICS : les TEMPLATES
|
||||
static const Handle(Dico_DictionaryOfTransient)& templates()
|
||||
{
|
||||
static Handle(Dico_DictionaryOfTransient) atemp;
|
||||
if (atemp.IsNull()) atemp = new Dico_DictionaryOfTransient;
|
||||
return atemp;
|
||||
}
|
||||
|
||||
|
||||
static const Handle(Standard_Type)& typerep()
|
||||
{
|
||||
static Handle(Standard_Type) tr = STANDARD_TYPE(Interface_ReportEntity);
|
||||
return tr;
|
||||
}
|
||||
|
||||
|
||||
static const Handle(Interface_Check)& nulch()
|
||||
{
|
||||
static Handle(Interface_Check) anulch = new Interface_Check;
|
||||
@@ -87,7 +66,7 @@ Interface_InterfaceModel::Interface_InterfaceModel ()
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_InterfaceModel::Destroy () // on fait un mimumum
|
||||
Interface_InterfaceModel::~Interface_InterfaceModel () // on fait un mimumum
|
||||
{
|
||||
// Moins que Clear que, lui, est adapte a chaque norme
|
||||
ClearEntities();
|
||||
@@ -121,28 +100,6 @@ Handle(Interface_Protocol) Interface_InterfaceModel::Protocol () const
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetGTool
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_InterfaceModel::SetGTool(const Handle(Interface_GTool)& gtool)
|
||||
{
|
||||
thegtool = gtool;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GTool
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Interface_GTool) Interface_InterfaceModel::GTool () const
|
||||
{
|
||||
return thegtool;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Clear
|
||||
//purpose :
|
||||
@@ -159,17 +116,6 @@ void Interface_InterfaceModel::Clear ()
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : DispatchStatus
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean& Interface_InterfaceModel::DispatchStatus ()
|
||||
{
|
||||
return isdispatch;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : ClearEntities
|
||||
//purpose :
|
||||
@@ -182,14 +128,6 @@ void Interface_InterfaceModel::ClearEntities ()
|
||||
haschecksem = Standard_False;
|
||||
|
||||
if (!thegtool.IsNull()) {
|
||||
// WhenDeleteCase is not applicable
|
||||
/* Handle(Interface_GeneralModule) module; Standard_Integer CN;
|
||||
Standard_Integer nb = NbEntities();
|
||||
for (Standard_Integer i = 1; i <= nb ; i ++) {
|
||||
Handle(Standard_Transient) anent = Value(i);
|
||||
if (thegtool->Select (anent,module,CN))
|
||||
module->WhenDeleteCase (CN,anent,isdispatch);
|
||||
}*/
|
||||
thegtool->ClearEntities(); //smh#14 FRA62479
|
||||
}
|
||||
isdispatch = Standard_False;
|
||||
@@ -200,24 +138,12 @@ void Interface_InterfaceModel::ClearEntities ()
|
||||
// .... ACCES AUX ENTITES ....
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : NbEntities
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer Interface_InterfaceModel::NbEntities () const
|
||||
{
|
||||
return theentities.Extent();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Contains
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Interface_InterfaceModel::Contains
|
||||
(const Handle(Standard_Transient)& anentity) const
|
||||
Standard_Boolean Interface_InterfaceModel::Contains (const Handle(Standard_Transient)& anentity) const
|
||||
{
|
||||
if (theentities.Contains(anentity)) return Standard_True;
|
||||
Handle(Interface_ReportEntity) rep =
|
||||
@@ -232,13 +158,12 @@ Standard_Boolean Interface_InterfaceModel::Contains
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer Interface_InterfaceModel::Number
|
||||
(const Handle(Standard_Transient)& anentity) const
|
||||
Standard_Integer Interface_InterfaceModel::Number (const Handle(Standard_Transient)& anentity) const
|
||||
{
|
||||
if (anentity.IsNull()) return 0;
|
||||
Standard_Integer num = theentities.FindIndex(anentity);
|
||||
if (num > 0) return num;
|
||||
if (anentity->IsKind(typerep())) {
|
||||
if (anentity->IsKind(STANDARD_TYPE(Interface_ReportEntity))) {
|
||||
Handle(Interface_ReportEntity) rep =
|
||||
Handle(Interface_ReportEntity)::DownCast(anentity);
|
||||
if (!rep.IsNull()) return Number(rep->Concerned());
|
||||
@@ -246,44 +171,15 @@ Standard_Integer Interface_InterfaceModel::Number
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Standard_Integer Interface_InterfaceModel::DENumber
|
||||
(const Handle(Standard_Transient)& anentity) const
|
||||
{
|
||||
if (anentity.IsNull()) return 0;
|
||||
Standard_Integer num = theentities.FindIndex(anentity);
|
||||
if (num > 0) return (2*num-1);
|
||||
if (anentity->IsKind(typerep())) {
|
||||
Handle(Interface_ReportEntity) rep =
|
||||
Handle(Interface_ReportEntity)::DownCast(anentity);
|
||||
if (!rep.IsNull()) return (Number(rep->Concerned())*2-1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
// .. Acces Speciaux (Report, etc...) ..
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Value
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
const Handle(Standard_Transient)& Interface_InterfaceModel::Value
|
||||
(const Standard_Integer num) const
|
||||
{
|
||||
return theentities.FindKey(num);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : NbTypes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer Interface_InterfaceModel::NbTypes
|
||||
(const Handle(Standard_Transient)& ent) const
|
||||
Standard_Integer Interface_InterfaceModel::NbTypes (const Handle(Standard_Transient)& ent) const
|
||||
{
|
||||
if (Protocol().IsNull()) return 1;
|
||||
return Protocol()->NbTypes(ent);
|
||||
@@ -334,8 +230,7 @@ Standard_CString Interface_InterfaceModel::ClassName(const Standard_CString typn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Interface_DataState Interface_InterfaceModel::EntityState
|
||||
(const Standard_Integer num) const
|
||||
Interface_DataState Interface_InterfaceModel::EntityState (const Standard_Integer num) const
|
||||
{
|
||||
Handle(Interface_ReportEntity) rep;
|
||||
if (!thereports.IsBound(num)) {
|
||||
@@ -528,17 +423,6 @@ void Interface_InterfaceModel::FillSemanticChecks
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : HasSemanticChecks
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Interface_InterfaceModel::HasSemanticChecks () const
|
||||
{
|
||||
return haschecksem;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Check
|
||||
//purpose :
|
||||
@@ -584,8 +468,7 @@ void Interface_InterfaceModel::Reservate (const Standard_Integer nbent)
|
||||
|
||||
void Interface_InterfaceModel::AddEntity(const Handle(Standard_Transient)& anentity)
|
||||
{
|
||||
//Standard_Integer newnum; svv #2
|
||||
if (!anentity->IsKind(typerep())) theentities.Add(anentity);
|
||||
if (!anentity->IsKind(STANDARD_TYPE(Interface_ReportEntity))) theentities.Add(anentity);
|
||||
// Report : Ajouter Concerned, mais noter presence Report et sa valeur
|
||||
else {
|
||||
Handle(Interface_ReportEntity) rep =
|
||||
@@ -669,17 +552,6 @@ void Interface_InterfaceModel::AddWithRefs(const Handle(Standard_Transient)& ane
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : ReplaceEntity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_InterfaceModel::ReplaceEntity(const Standard_Integer nument,
|
||||
const Handle(Standard_Transient)& anent)
|
||||
{
|
||||
theentities.Substitute(nument,anent);
|
||||
}
|
||||
|
||||
// ReverseOrders permet de mieux controler la numeration des Entites :
|
||||
// Souvent, les fichiers mettent les racines en fin, tandis que AddWithRefs
|
||||
// les met en tete.
|
||||
@@ -769,8 +641,7 @@ void Interface_InterfaceModel::ChangeOrder(const Standard_Integer oldnum,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_InterfaceModel::GetFromTransfer
|
||||
(const Interface_EntityIterator& aniter)
|
||||
void Interface_InterfaceModel::GetFromTransfer (const Interface_EntityIterator& aniter)
|
||||
{
|
||||
theentities.Clear(); theentities.ReSize (aniter.NbEntities());
|
||||
for (aniter.Start(); aniter.More(); aniter.Next()) {
|
||||
@@ -787,8 +658,7 @@ void Interface_InterfaceModel::GetFromTransfer
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Interface_InterfaceModel::SetCategoryNumber
|
||||
(const Standard_Integer num, const Standard_Integer val)
|
||||
Standard_Boolean Interface_InterfaceModel::SetCategoryNumber (const Standard_Integer num, const Standard_Integer val)
|
||||
{
|
||||
Standard_Integer i,nb = NbEntities();
|
||||
if (num < 1 || num > nb) return Standard_False;
|
||||
@@ -810,8 +680,7 @@ Standard_Boolean Interface_InterfaceModel::SetCategoryNumber
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer Interface_InterfaceModel::CategoryNumber
|
||||
(const Standard_Integer num) const
|
||||
Standard_Integer Interface_InterfaceModel::CategoryNumber (const Standard_Integer num) const
|
||||
{
|
||||
if (thecategory.IsNull()) return 0;
|
||||
if (num < 1 || num > thecategory->Length()) return 0;
|
||||
@@ -825,7 +694,7 @@ Standard_Integer Interface_InterfaceModel::CategoryNumber
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_InterfaceModel::FillIterator(Interface_EntityIterator& iter) const
|
||||
void Interface_InterfaceModel::FillIterator (Interface_EntityIterator& iter) const
|
||||
{
|
||||
Standard_Integer nb = NbEntities();
|
||||
for (Standard_Integer i = 1; i <= nb; i ++)
|
||||
@@ -885,44 +754,6 @@ Interface_EntityIterator Interface_InterfaceModel::Redefineds () const
|
||||
return iter;
|
||||
}
|
||||
|
||||
//#include <limits.h>
|
||||
//#include <TColStd_MapTransientHasher.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GlobalCheck
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
const Handle(Interface_Check)& Interface_InterfaceModel::GlobalCheck
|
||||
(const Standard_Boolean syntactic) const
|
||||
{
|
||||
if (syntactic) return thecheckstx;
|
||||
else return thechecksem;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetGlobalCheck
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_InterfaceModel::SetGlobalCheck(const Handle(Interface_Check)& ach)
|
||||
{
|
||||
thecheckstx = ach;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : VerifyCheck
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Interface_InterfaceModel::VerifyCheck (Handle(Interface_Check)& /*ach*/) const
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Print
|
||||
//purpose :
|
||||
@@ -994,65 +825,3 @@ Standard_Integer Interface_InterfaceModel::NextNumberForLabel
|
||||
if (i <= 0 || i > n) i = 0;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : HasTemplate
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Interface_InterfaceModel::HasTemplate
|
||||
(const Standard_CString name)
|
||||
{
|
||||
return templates()->HasItem(name);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Template
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Interface_InterfaceModel) Interface_InterfaceModel::Template
|
||||
(const Standard_CString name)
|
||||
{
|
||||
Handle(Interface_InterfaceModel) model,newmod;
|
||||
if (!HasTemplate(name)) return model;
|
||||
model = Handle(Interface_InterfaceModel)::DownCast(templates()->Item(name));
|
||||
newmod = model->NewEmptyModel();
|
||||
newmod->GetFromAnother (model);
|
||||
return newmod;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetTemplate
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Interface_InterfaceModel::SetTemplate
|
||||
(const Standard_CString name, const Handle(Interface_InterfaceModel)& model)
|
||||
{
|
||||
Standard_Boolean deja;
|
||||
Handle(Standard_Transient)& newmod = templates()->NewItem(name,deja);
|
||||
newmod = model;
|
||||
return deja;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : ListTemplates
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(TColStd_HSequenceOfHAsciiString) Interface_InterfaceModel::ListTemplates ()
|
||||
{
|
||||
Handle(TColStd_HSequenceOfHAsciiString) list = new
|
||||
TColStd_HSequenceOfHAsciiString();
|
||||
if (templates().IsNull()) return list;
|
||||
for (Dico_IteratorOfDictionaryOfTransient iter(templates());
|
||||
iter.More(); iter.Next()) {
|
||||
list->Append (new TCollection_HAsciiString (iter.Name()) );
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
@@ -18,24 +18,16 @@
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
|
||||
#include <TColStd_IndexedMapOfTransient.hxx>
|
||||
#include <TColStd_DataMapOfIntegerTransient.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Interface_DataState.hxx>
|
||||
#include <TColStd_HSequenceOfHAsciiString.hxx>
|
||||
class Interface_Check;
|
||||
class TCollection_HAsciiString;
|
||||
class Interface_GTool;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Interface_InterfaceMismatch;
|
||||
class Interface_Protocol;
|
||||
class Standard_Transient;
|
||||
class Interface_ReportEntity;
|
||||
class Interface_CheckIterator;
|
||||
class Interface_GeneralLib;
|
||||
@@ -74,16 +66,10 @@ DEFINE_STANDARD_HANDLE(Interface_InterfaceModel, MMgt_TShared)
|
||||
//! See also Graph, ShareTool, CheckTool for more
|
||||
class Interface_InterfaceModel : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
//! Clears the list of entities (service WhenDelete)
|
||||
Standard_EXPORT void Destroy();
|
||||
~Interface_InterfaceModel()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
Standard_EXPORT ~Interface_InterfaceModel();
|
||||
|
||||
//! Sets a Protocol for this Model
|
||||
//! It is also set by a call to AddWithRefs with Protocol
|
||||
@@ -95,16 +81,16 @@ public:
|
||||
Standard_EXPORT virtual Handle(Interface_Protocol) Protocol() const;
|
||||
|
||||
//! Sets a GTool for this model, which already defines a Protocol
|
||||
Standard_EXPORT void SetGTool (const Handle(Interface_GTool)& gtool);
|
||||
void SetGTool (const Handle(Interface_GTool)& gtool) { thegtool = gtool; }
|
||||
|
||||
//! Returns the GTool, set by SetProtocol or by SetGTool
|
||||
Standard_EXPORT Handle(Interface_GTool) GTool() const;
|
||||
const Handle(Interface_GTool) & GTool() const { return thegtool; }
|
||||
|
||||
//! Returns the Dispatch Status, either for get or set
|
||||
//! A Model which is produced from Dispatch may share entities
|
||||
//! with the original (according to the Protocol), hence these
|
||||
//! non-copied entities should not be deleted
|
||||
Standard_EXPORT Standard_Boolean& DispatchStatus();
|
||||
Standard_Boolean& DispatchStatus() { return isdispatch; }
|
||||
|
||||
//! Erases contained data; used when a Model is copied to others :
|
||||
//! the new copied ones begin from clear
|
||||
@@ -123,7 +109,7 @@ public:
|
||||
Standard_EXPORT virtual void ClearHeader() = 0;
|
||||
|
||||
//! Returns count of contained Entities
|
||||
Standard_EXPORT Standard_Integer NbEntities() const;
|
||||
Standard_Integer NbEntities() const { return theentities.Extent(); }
|
||||
|
||||
//! Returns True if a Model contains an Entity (for a ReportEntity,
|
||||
//! looks for the ReportEntity itself AND its Concerned Entity)
|
||||
@@ -143,7 +129,7 @@ public:
|
||||
//! Remark : For a Reported Entity, (Erroneous, Corrected, Unknown), this
|
||||
//! method returns this Reported Entity.
|
||||
//! See ReportEntity for other questions.
|
||||
Standard_EXPORT const Handle(Standard_Transient)& Value (const Standard_Integer num) const;
|
||||
const Handle(Standard_Transient)& Value (const Standard_Integer num) const { return theentities.FindKey(num); }
|
||||
|
||||
//! Returns the count of DISTINCT types under which an entity may
|
||||
//! be processed. Defined by the Protocol, which gives default as
|
||||
@@ -226,7 +212,7 @@ public:
|
||||
Standard_EXPORT void FillSemanticChecks (const Interface_CheckIterator& checks, const Standard_Boolean clear = Standard_True);
|
||||
|
||||
//! Returns True if semantic checks have been filled
|
||||
Standard_EXPORT Standard_Boolean HasSemanticChecks() const;
|
||||
Standard_Boolean HasSemanticChecks() const { return haschecksem; }
|
||||
|
||||
//! Returns the check attached to an entity, designated by its
|
||||
//! Number. 0 for global check
|
||||
@@ -270,7 +256,7 @@ public:
|
||||
Standard_EXPORT void AddWithRefs (const Handle(Standard_Transient)& anent, const Interface_GeneralLib& lib, const Standard_Integer level = 0, const Standard_Boolean listall = Standard_False);
|
||||
|
||||
//! Replace Entity with Number=nument on other entity - "anent"
|
||||
Standard_EXPORT void ReplaceEntity (const Standard_Integer nument, const Handle(Standard_Transient)& anent);
|
||||
void ReplaceEntity (const Standard_Integer nument, const Handle(Standard_Transient)& anent) { theentities.Substitute(nument,anent); }
|
||||
|
||||
//! Reverses the Numbers of the Entities, between <after> and the
|
||||
//! total count of Entities. Thus, the entities :
|
||||
@@ -330,17 +316,17 @@ public:
|
||||
|
||||
//! Returns the GlobalCheck, which memorizes messages global to
|
||||
//! the file (not specific to an Entity), especially Header
|
||||
Standard_EXPORT const Handle(Interface_Check)& GlobalCheck (const Standard_Boolean syntactic = Standard_True) const;
|
||||
const Handle(Interface_Check)& GlobalCheck (const Standard_Boolean syntactic = Standard_True) const { return (syntactic? thecheckstx : thechecksem); }
|
||||
|
||||
//! Allows to modify GlobalCheck, after getting then completing it
|
||||
//! Remark : it is SYNTACTIC check. Semantics, see FillChecks
|
||||
Standard_EXPORT void SetGlobalCheck (const Handle(Interface_Check)& ach);
|
||||
void SetGlobalCheck (const Handle(Interface_Check)& ach) { thecheckstx = ach; }
|
||||
|
||||
//! Minimum Semantic Global Check on data in model (header)
|
||||
//! Can only check basic Data. See also GlobalCheck from Protocol
|
||||
//! for a check which takes the Graph into account
|
||||
//! Default does nothing, can be redefined
|
||||
Standard_EXPORT virtual void VerifyCheck (Handle(Interface_Check)& ach) const;
|
||||
Standard_EXPORT virtual void VerifyCheck (Handle(Interface_Check)&) const {}
|
||||
|
||||
//! Dumps Header in a short, easy to read, form, onto a Stream
|
||||
//! <level> allows to print more or less parts of the header,
|
||||
@@ -383,35 +369,14 @@ public:
|
||||
//! efficient search (if exact is true).
|
||||
Standard_EXPORT virtual Standard_Integer NextNumberForLabel (const Standard_CString label, const Standard_Integer lastnum = 0, const Standard_Boolean exact = Standard_True) const;
|
||||
|
||||
//! Returns true if a template is attached to a given name
|
||||
Standard_EXPORT static Standard_Boolean HasTemplate (const Standard_CString name);
|
||||
|
||||
//! Returns the template model attached to a name, or a Null Handle
|
||||
Standard_EXPORT static Handle(Interface_InterfaceModel) Template (const Standard_CString name);
|
||||
|
||||
//! Records a new template model with a name. If the name was
|
||||
//! already recorded, the corresponding template is replaced by
|
||||
//! the new one. Then, WARNING : test HasTemplate to avoid
|
||||
//! surprises
|
||||
Standard_EXPORT static Standard_Boolean SetTemplate (const Standard_CString name, const Handle(Interface_InterfaceModel)& model);
|
||||
|
||||
//! Returns the complete list of names attached to template models
|
||||
Standard_EXPORT static Handle(TColStd_HSequenceOfHAsciiString) ListTemplates();
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(Interface_InterfaceModel,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
|
||||
//! Defines empty InterfaceModel, ready to be filled
|
||||
Standard_EXPORT Interface_InterfaceModel();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
TColStd_IndexedMapOfTransient theentities;
|
||||
TColStd_DataMapOfIntegerTransient thereports;
|
||||
@@ -422,14 +387,6 @@ private:
|
||||
Standard_Boolean isdispatch;
|
||||
Handle(TCollection_HAsciiString) thecategory;
|
||||
Handle(Interface_GTool) thegtool;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Interface_InterfaceModel_HeaderFile
|
||||
|
@@ -25,150 +25,41 @@
|
||||
#include <Interface_ShareTool.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
|
||||
Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Interface_GeneralLib& lib)
|
||||
Standard_Boolean Interface_ShareTool::IsShared (const Handle(Standard_Transient)& ent) const
|
||||
{
|
||||
theHGraph = new Interface_HGraph(amodel,lib);
|
||||
}
|
||||
|
||||
Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Handle(Interface_GTool)& gtool)
|
||||
{
|
||||
theHGraph = new Interface_HGraph(amodel,gtool);
|
||||
}
|
||||
|
||||
Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel,
|
||||
const Handle(Interface_Protocol)& protocol)
|
||||
{
|
||||
theHGraph = new Interface_HGraph(amodel,protocol);
|
||||
}
|
||||
|
||||
Interface_ShareTool::Interface_ShareTool (const Handle(Interface_InterfaceModel)& amodel)
|
||||
{
|
||||
theHGraph = new Interface_HGraph(amodel);
|
||||
}
|
||||
|
||||
Interface_ShareTool::Interface_ShareTool (const Interface_Graph& agraph)
|
||||
{
|
||||
theHGraph = new Interface_HGraph(agraph.Model());
|
||||
}
|
||||
|
||||
Interface_ShareTool::Interface_ShareTool (const Handle(Interface_HGraph)& ahgraph)
|
||||
{
|
||||
theHGraph = ahgraph;
|
||||
}
|
||||
|
||||
// Ajout des "Implied" sur toutes les Entites du Graphe
|
||||
/*void Interface_ShareTool::AddImplied (const Handle(Interface_GTool)& gtool)
|
||||
{
|
||||
Interface_Graph& thegraph = theHGraph->CGraph();
|
||||
Standard_Integer nb = thegraph.Size();
|
||||
Standard_Boolean yena = Standard_False;
|
||||
for (Standard_Integer i = 1; i <= nb; i ++) {
|
||||
Handle(Standard_Transient) ent = thegraph.Entity(i);
|
||||
if (ent.IsNull()) continue;
|
||||
Handle(Interface_GeneralModule) module; Standard_Integer CN;
|
||||
if (gtool->Select(ent,module,CN)) {
|
||||
Interface_EntityIterator iter;
|
||||
module->ListImpliedCase(CN,ent,iter);
|
||||
if (iter.NbEntities() == 0) continue;
|
||||
yena = Standard_True;
|
||||
thegraph.SetShare(ent);
|
||||
for (iter.Start(); iter.More(); iter.Next())
|
||||
thegraph.AddShared(ent,iter.Value());
|
||||
}
|
||||
}
|
||||
if (yena) thegraph.EvalSharings();
|
||||
}*/
|
||||
|
||||
|
||||
Handle(Interface_InterfaceModel) Interface_ShareTool::Model () const
|
||||
{ return theHGraph->Graph().Model(); }
|
||||
|
||||
const Interface_Graph& Interface_ShareTool::Graph () const
|
||||
{ return theHGraph->Graph(); }
|
||||
|
||||
Interface_EntityIterator Interface_ShareTool::RootEntities () const
|
||||
{ return theHGraph->Graph().RootEntities(); }
|
||||
|
||||
Standard_Boolean Interface_ShareTool::IsShared
|
||||
(const Handle(Standard_Transient)& ent) const
|
||||
{
|
||||
const Interface_Graph& thegraph = theHGraph->Graph();
|
||||
Handle(TColStd_HSequenceOfTransient) list =
|
||||
thegraph.GetShareds (ent);
|
||||
Handle(TColStd_HSequenceOfTransient) list = Graph().GetShareds (ent);
|
||||
return (!list.IsNull() && list->Length() > 0);
|
||||
}
|
||||
|
||||
Interface_EntityIterator Interface_ShareTool::Shareds
|
||||
(const Handle(Standard_Transient)& ent) const
|
||||
{ return theHGraph->Graph().Shareds(ent); }
|
||||
|
||||
Interface_EntityIterator Interface_ShareTool::Sharings
|
||||
(const Handle(Standard_Transient)& ent) const
|
||||
{ return theHGraph->Graph().Sharings(ent); }
|
||||
|
||||
|
||||
Standard_Integer Interface_ShareTool::NbTypedSharings
|
||||
(const Handle(Standard_Transient)& ent,
|
||||
const Handle(Standard_Type)& atype) const
|
||||
/*szv_c1:Standard_Integer Interface_ShareTool::NbTypedSharings (const Handle(Standard_Transient)& ent, const Handle(Standard_Type)& atype) const
|
||||
{
|
||||
Interface_Graph& thegraph = theHGraph->CGraph();
|
||||
Handle(TColStd_HSequenceOfTransient) list = thegraph.GetSharings (ent);
|
||||
Handle(TColStd_HSequenceOfTransient) list = Graph().GetSharings (ent);
|
||||
if(list.IsNull())
|
||||
return 0;
|
||||
|
||||
Standard_Integer result = 0;
|
||||
Standard_Integer n = list->Length();
|
||||
const Standard_Integer n = list->Length();
|
||||
for (Standard_Integer i = 1; i <= n; i ++) {
|
||||
Handle(Standard_Transient) entsh = list->Value(i);
|
||||
const Handle(Standard_Transient) &entsh = list->Value(i);
|
||||
if (entsh.IsNull()) continue;
|
||||
if (entsh->IsKind(atype)) result ++;
|
||||
if (entsh->IsKind(atype)) result++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}*/
|
||||
|
||||
Handle(Standard_Transient) Interface_ShareTool::TypedSharing
|
||||
(const Handle(Standard_Transient)& ent,
|
||||
const Handle(Standard_Type)& atype) const
|
||||
Interface_EntityIterator Interface_ShareTool::All (const Handle(Standard_Transient)& ent, const Standard_Boolean rootlast) const
|
||||
{
|
||||
Interface_Graph& thegraph = theHGraph->CGraph();
|
||||
Handle(TColStd_HSequenceOfTransient) list = thegraph.GetSharings(ent);
|
||||
if(list.IsNull())
|
||||
return 0;
|
||||
Handle(Standard_Transient) entresult;
|
||||
Standard_Integer result = 0;
|
||||
Standard_Integer n = list->Length();
|
||||
for (Standard_Integer i = 1; i <= n; i ++) {
|
||||
Handle(Standard_Transient) entsh = list->Value(i);
|
||||
if (entsh.IsNull()) continue;
|
||||
if (entsh->IsKind(atype)) {
|
||||
entresult = entsh;
|
||||
result ++;
|
||||
if (result > 1) Interface_InterfaceError::Raise
|
||||
("Interface ShareTool : TypedSharing, more than one found");
|
||||
}
|
||||
}
|
||||
if (result == 0) Interface_InterfaceError::Raise
|
||||
("Interface ShareTool : TypedSharing, not found");
|
||||
return entresult;
|
||||
}
|
||||
|
||||
Interface_EntityIterator Interface_ShareTool::All
|
||||
(const Handle(Standard_Transient)& ent, const Standard_Boolean rootlast) const
|
||||
{
|
||||
Handle(Interface_InterfaceModel) model = Model();
|
||||
const Handle(Interface_InterfaceModel) &model = Graph().Model();
|
||||
Interface_EntityIterator list;
|
||||
Standard_Integer i, n0 = 0, nb = model->NbEntities();
|
||||
Handle(TColStd_HArray1OfInteger) fl = new TColStd_HArray1OfInteger (0,nb);
|
||||
fl->Init(0);
|
||||
if (ent == model) {
|
||||
// On passe les racines en revue (l ordre de base est conserve)
|
||||
Interface_EntityIterator roots = RootEntities();
|
||||
Interface_EntityIterator roots = Graph().RootEntities();
|
||||
for (roots.Start(); roots.More(); roots.Next()) {
|
||||
Interface_EntityIterator subl = All(roots.Value(),rootlast);
|
||||
for (subl.Start(); subl.More(); subl.Next()) {
|
||||
@@ -189,7 +80,7 @@ Interface_ShareTool::Interface_ShareTool (const Handle(Interface_HGraph)& ahgrap
|
||||
Standard_Integer num = model->Number(en);
|
||||
if (fl->Value(num) != 0) continue; // deja vu
|
||||
n0 ++; fl->SetValue (num,n0);
|
||||
Interface_EntityIterator sh = Shareds(en);
|
||||
Interface_EntityIterator sh = Graph().Shareds(en);
|
||||
sq->Append (sh.Content());
|
||||
}
|
||||
}
|
||||
@@ -204,14 +95,3 @@ Interface_ShareTool::Interface_ShareTool (const Handle(Interface_HGraph)& ahgrap
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
void Interface_ShareTool::Print
|
||||
(const Interface_EntityIterator& iter, const Handle(Message_Messenger)& S) const
|
||||
{
|
||||
S << " Nb.Entities : " << iter.NbEntities() << " : ";
|
||||
for (iter.Start(); iter.More(); iter.Next()) {
|
||||
Handle(Standard_Transient) ent = iter.Value();
|
||||
S << " n0/id:"; Model()->Print(ent,S);
|
||||
}
|
||||
S<<endl;
|
||||
}
|
||||
|
@@ -21,19 +21,9 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
class Interface_HGraph;
|
||||
class Standard_DomainError;
|
||||
class Interface_InterfaceError;
|
||||
#include <Interface_HGraph.hxx>
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_GeneralLib;
|
||||
class Interface_GTool;
|
||||
class Interface_Protocol;
|
||||
class Interface_Graph;
|
||||
class Interface_EntityIterator;
|
||||
class Standard_Transient;
|
||||
class Message_Messenger;
|
||||
|
||||
|
||||
@@ -45,62 +35,38 @@ class Message_Messenger;
|
||||
//! this can be usefull for Reference Checking
|
||||
class Interface_ShareTool
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a ShareTool from a Model and builds all required data,
|
||||
//! by calling the General Service Library and Modules
|
||||
//! (GeneralLib given as an argument)
|
||||
Standard_EXPORT Interface_ShareTool(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib);
|
||||
|
||||
//! Same a above, but GeneralLib is detained by a GTool
|
||||
Standard_EXPORT Interface_ShareTool(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_GTool)& gtool);
|
||||
|
||||
//! Same a above, but GeneralLib is defined through a Protocol
|
||||
//! Protocol is used to build the working library
|
||||
Standard_EXPORT Interface_ShareTool(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol);
|
||||
|
||||
//! Same as above, but works with the GTool of the Model
|
||||
Standard_EXPORT Interface_ShareTool(const Handle(Interface_InterfaceModel)& amodel);
|
||||
//! works with the GTool of the Model
|
||||
Interface_ShareTool(const Handle(Interface_InterfaceModel)& amodel)
|
||||
: theHGraph(new Interface_HGraph(amodel))
|
||||
{}
|
||||
|
||||
//! Creates a ShareTool from an already defined Graph
|
||||
//! Remark that the data of the Graph are copied
|
||||
Standard_EXPORT Interface_ShareTool(const Interface_Graph& agraph);
|
||||
Interface_ShareTool(const Interface_Graph& agraph)
|
||||
: theHGraph(new Interface_HGraph(agraph.Model()))
|
||||
{}
|
||||
|
||||
//! Completes the Graph by Adding Implied References. Hence, they
|
||||
//! are considered as Sharing References in all the other queries
|
||||
Standard_EXPORT Interface_ShareTool(const Handle(Interface_HGraph)& ahgraph);
|
||||
|
||||
//! Returns the Model used for Creation (directly or for Graph)
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
|
||||
Interface_ShareTool(const Handle(Interface_HGraph)& ahgraph)
|
||||
: theHGraph(ahgraph)
|
||||
{}
|
||||
|
||||
//! Returns the data used by the ShareTool to work
|
||||
//! Can then be used directly (read only)
|
||||
Standard_EXPORT const Interface_Graph& Graph() const;
|
||||
|
||||
//! Returns the Entities which are not Shared (their Sharing List
|
||||
//! is empty) in the Model
|
||||
Standard_EXPORT Interface_EntityIterator RootEntities() const;
|
||||
const Interface_Graph& Graph() const { return theHGraph->Graph(); }
|
||||
|
||||
//! Returns True if <ent> is Shared by other Entities in the Model
|
||||
Standard_EXPORT Standard_Boolean IsShared (const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
//! Returns the List of Entities Shared by a given Entity <ent>
|
||||
Standard_EXPORT Interface_EntityIterator Shareds (const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
//! Returns the List of Entities Sharing a given Entity <ent>
|
||||
Standard_EXPORT Interface_EntityIterator Sharings (const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
//! Returns the count of Sharing Entities of an Entity, which
|
||||
//! are Kind of a given Type
|
||||
Standard_EXPORT Standard_Integer NbTypedSharings (const Handle(Standard_Transient)& ent, const Handle(Standard_Type)& atype) const;
|
||||
|
||||
//! Returns the Sharing Entity of an Entity, which is Kind of a
|
||||
//! given Type. Allows to access a Sharing Entity of a given type
|
||||
//! when there is one and only one (current case)
|
||||
Standard_EXPORT Handle(Standard_Transient) TypedSharing (const Handle(Standard_Transient)& ent, const Handle(Standard_Type)& atype) const;
|
||||
//szv_c1:Standard_EXPORT Standard_Integer NbTypedSharings (const Handle(Standard_Transient)& ent, const Handle(Standard_Type)& atype) const;
|
||||
|
||||
//! Returns the complete list of entities shared by <ent> at any
|
||||
//! level, including <ent> itself
|
||||
@@ -111,32 +77,9 @@ public:
|
||||
//! the lower level entities are at end
|
||||
Standard_EXPORT Interface_EntityIterator All (const Handle(Standard_Transient)& ent, const Standard_Boolean rootlast = Standard_True) const;
|
||||
|
||||
//! Utility method which Prints the content of an iterator
|
||||
//! (by their Numbers)
|
||||
Standard_EXPORT void Print (const Interface_EntityIterator& iter, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Handle(Interface_HGraph) theHGraph;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Interface_ShareTool_HeaderFile
|
||||
|
@@ -1,92 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// Macros to help static Handles not to be "constructed" before main run
|
||||
// In order to avoid it, the Handle to be statically reserved is encapsulated
|
||||
// in a structure itself designated through a Null Pointer :
|
||||
// Only the pointer is declared static, and initialized to NULL : then,
|
||||
// there is no routine to call for static construction
|
||||
|
||||
// Remember that the objet designated by a static Handle should not be created
|
||||
// in the static declaration, but must anyway be created, during main run,
|
||||
// once before its first use : this is the initialization step.
|
||||
|
||||
|
||||
// This set of macros allows user to simply declare and use "static" Handles.
|
||||
// It is available once having included this file :
|
||||
// ***************************************************
|
||||
// #include <Interface_Statics.hxx>
|
||||
|
||||
// Static construction is replaced by using the macro StaticHandle :
|
||||
// ***************************************************
|
||||
// Old statement : static Handle(pk_class) object;
|
||||
// Is replaced by : StaticHandle(pk_class,object);
|
||||
// which creates a null pointer called 'object_s' and typed 'pk_class_struc'
|
||||
|
||||
// For first initialisation and use, several ways are available, all of them
|
||||
// give an access to the Handle through a reference.
|
||||
// It is required to initialize the static structure once, the macros Init*
|
||||
// assume that it is created once and only once, even if they are called
|
||||
// more than once.
|
||||
// It is possible : to create the object at initialization time by a macro,
|
||||
// or to create it after the macro call through its reference :
|
||||
|
||||
// ***************************************************
|
||||
// Old statement (in a routine, not static) :
|
||||
// if (object.IsNull()) object = new pk_class (..args if any..);
|
||||
// can be maintained, but preceeded by an initialization :
|
||||
// InitHandle(pk_class,object); // -> Null Handle
|
||||
|
||||
// ***************************************************
|
||||
// or it can be replaced by a direct formula (creation called only once) :
|
||||
// InitHandleVoid(pk_class,object); // for a void constructor
|
||||
// or InitHandleArgs(pk_class,object,(..args..));
|
||||
// (the arglist between embedded parentheses)
|
||||
// or InitHandleVal(pk_class,object,val); // i.e. object = val;
|
||||
|
||||
// To simply use this pseudo-static object, consider
|
||||
// either the static variable object_s->H
|
||||
// ***************************************************
|
||||
// or take it by the macro (which does not initialize it)
|
||||
// UseHandle(pk_class,object);
|
||||
|
||||
|
||||
// Declaration of a static Handle : first use for a given type
|
||||
#define StaticHandle(type,var) static struct type##_struc { Handle(type) H; } *var##_s = NULL
|
||||
|
||||
// Another declaration for an already declared type (with StaticHandle)
|
||||
#define StaticHandleA(type,var) static struct type##_struc *var##_s = NULL
|
||||
|
||||
// Using it (IT MUST HAVE BEEN FORMERLY INITIALIZED)
|
||||
#define UseHandle(type,var) Handle(type)& var = var##_s->H
|
||||
|
||||
// Initializing it (as Null Handle)
|
||||
#define InitHandle(type,var) \
|
||||
if(!var##_s) { var##_s=new type##_struc; }\
|
||||
Handle(type)& var = var##_s->H;
|
||||
|
||||
// Initializing it and Creating it by a Void Constructor
|
||||
#define InitHandleVoid(type,var) \
|
||||
if(!var##_s) { var##_s=new type##_struc; var##_s->H=new type; }\
|
||||
Handle(type)& var = var##_s->H;
|
||||
|
||||
// Initializing it and Creating it by a Constructor with Arguments
|
||||
// (give them grouped in their parentheses)
|
||||
#define InitHandleArgs(type,var,args) \
|
||||
if(!var##_s) { var##_s=new type##_struc; var##_s->H=new type args; }\
|
||||
Handle(type)& var = var##_s->H;
|
||||
|
||||
// Initializing it from an already determined Value
|
||||
#define InitHandleVal(type,var,value) \
|
||||
if(!var##_s) { var##_s=new type##_struc; var##_s->H=value; }\
|
||||
Handle(type)& var = var##_s->H;
|
@@ -4670,7 +4670,7 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer
|
||||
di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
|
||||
di<<" To modify : command param read.iges.bspline.continuity\n";
|
||||
Handle(XSControl_WorkSession) thesession = Reader.WS();
|
||||
thesession->ClearContext();
|
||||
thesession->TransferReader()->Context().Nullify();
|
||||
XSDRAW::SetTransferProcess (thesession->TransferReader()->TransientProcess());
|
||||
progress->NewScope ( 80, "Translation" );
|
||||
progress->Show();
|
||||
@@ -4771,7 +4771,7 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer
|
||||
di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
|
||||
di<<" To modify : command param read.iges.bspline.continuity\n";
|
||||
Handle(XSControl_WorkSession) thesession = Reader.WS();
|
||||
thesession->ClearContext();
|
||||
thesession->TransferReader()->Context().Nullify();
|
||||
XSDRAW::SetTransferProcess (thesession->TransferReader()->TransientProcess());
|
||||
progress->NewScope ( 80, "Translation" );
|
||||
progress->Show();
|
||||
|
@@ -587,8 +587,6 @@ static Standard_Integer OCC395 (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
di << "Usage : " << argv[0] << " edge_result edge1 edge2\n";
|
||||
return 1;
|
||||
}
|
||||
//TCollection_AsciiString fnom(a[1]);
|
||||
//Standard_Boolean modfic = XSDRAW::FileAndVar(a[1],a[2],a[3],"IGES",fnom,rnom,resnom);
|
||||
TopoDS_Shape Sh1 = DBRep::Get(argv[2]);
|
||||
TopoDS_Shape Sh2 = DBRep::Get(argv[3]);
|
||||
if(Sh1.IsNull() || Sh2.IsNull()) return 1;
|
||||
@@ -600,15 +598,9 @@ static Standard_Integer OCC395 (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
Handle(Geom_Curve) ac1 = BRep_Tool::Curve(e1,f1,l1);
|
||||
Handle(Geom_Curve) ac2 = BRep_Tool::Curve(e2,f2,l2);
|
||||
if(e1.Orientation() == TopAbs_REVERSED) {
|
||||
//Standard_Real cf = cf1;
|
||||
//cf1 = ac1->ReversedParameter ( cl1 );
|
||||
//cl1 = ac1->ReversedParameter ( cf );
|
||||
ac1 = ac1->Reversed();
|
||||
}
|
||||
if(e2.Orientation() == TopAbs_REVERSED) {
|
||||
//Standard_Real cf = cf2;
|
||||
//ac2 = ac2->ReversedParameter ( cl2 );
|
||||
//ac2 = ac2->ReversedParameter ( cf );
|
||||
ac2 = ac2->Reversed();
|
||||
}
|
||||
Handle(Geom_BSplineCurve) bsplc1 = Handle(Geom_BSplineCurve)::DownCast(ac1);
|
||||
|
@@ -12,25 +12,17 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <HeaderSection.hxx>
|
||||
#include <HeaderSection_Protocol.hxx>
|
||||
#include <RWHeaderSection.hxx>
|
||||
#include <RWHeaderSection_GeneralModule.hxx>
|
||||
#include <RWHeaderSection_ReadWriteModule.hxx>
|
||||
#include <StepData.hxx>
|
||||
|
||||
/// #include <EuclidStandard.hxx>
|
||||
static Handle(RWHeaderSection_ReadWriteModule) rwm;
|
||||
static Handle(RWHeaderSection_GeneralModule) rwg;
|
||||
|
||||
|
||||
void RWHeaderSection::Init()
|
||||
{
|
||||
/// EuclidStandard::Init();
|
||||
Handle(HeaderSection_Protocol) proto = HeaderSection::Protocol();
|
||||
StepData::AddHeaderProtocol(proto);
|
||||
const Handle(StepData_Protocol) &hp = StepData::HeaderProtocol();
|
||||
if (rwm.IsNull()) rwm = new RWHeaderSection_ReadWriteModule;
|
||||
if (rwg.IsNull()) rwg = new RWHeaderSection_GeneralModule;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -18,53 +18,13 @@
|
||||
#define _RWHeaderSection_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
class RWHeaderSection_ReadWriteModule;
|
||||
class RWHeaderSection_GeneralModule;
|
||||
class RWHeaderSection_RWFileName;
|
||||
class RWHeaderSection_RWFileDescription;
|
||||
class RWHeaderSection_RWFileSchema;
|
||||
|
||||
|
||||
|
||||
class RWHeaderSection
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
public:
|
||||
|
||||
//! enforced the initialisation of the libraries
|
||||
Standard_EXPORT static void Init();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class RWHeaderSection_ReadWriteModule;
|
||||
friend class RWHeaderSection_GeneralModule;
|
||||
friend class RWHeaderSection_RWFileName;
|
||||
friend class RWHeaderSection_RWFileDescription;
|
||||
friend class RWHeaderSection_RWFileSchema;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _RWHeaderSection_HeaderFile
|
||||
|
@@ -22,14 +22,14 @@
|
||||
#include <StepAP214_Protocol.hxx>
|
||||
#include <StepData_WriterLib.hxx>
|
||||
|
||||
static int init = 0;
|
||||
|
||||
void RWStepAP214::Init()
|
||||
{
|
||||
if (init) return; init = 1;
|
||||
RWHeaderSection::Init();
|
||||
Handle(StepAP214_Protocol) proto = StepAP214::Protocol();
|
||||
Interface_GeneralLib::SetGlobal (new RWStepAP214_GeneralModule,proto);
|
||||
Interface_ReaderLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
|
||||
StepData_WriterLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
|
||||
}
|
||||
{
|
||||
static int init = 0;
|
||||
if (init) return; init = 1;
|
||||
|
||||
RWHeaderSection::Init();
|
||||
const Handle(StepAP214_Protocol) &proto = StepAP214::Protocol();
|
||||
Interface_GeneralLib::SetGlobal (new RWStepAP214_GeneralModule,proto);
|
||||
Interface_ReaderLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
|
||||
StepData_WriterLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
|
||||
}
|
||||
|
@@ -18,99 +18,13 @@
|
||||
#define _RWStepAP214_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
class RWStepAP214_ReadWriteModule;
|
||||
class RWStepAP214_GeneralModule;
|
||||
class RWStepAP214_RWAutoDesignActualDateAndTimeAssignment;
|
||||
class RWStepAP214_RWAutoDesignActualDateAssignment;
|
||||
class RWStepAP214_RWAutoDesignApprovalAssignment;
|
||||
class RWStepAP214_RWAutoDesignDateAndPersonAssignment;
|
||||
class RWStepAP214_RWAutoDesignGroupAssignment;
|
||||
class RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment;
|
||||
class RWStepAP214_RWAutoDesignNominalDateAssignment;
|
||||
class RWStepAP214_RWAutoDesignOrganizationAssignment;
|
||||
class RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment;
|
||||
class RWStepAP214_RWAutoDesignPresentedItem;
|
||||
class RWStepAP214_RWAutoDesignSecurityClassificationAssignment;
|
||||
class RWStepAP214_RWAutoDesignDocumentReference;
|
||||
class RWStepAP214_RWAppliedDateAndTimeAssignment;
|
||||
class RWStepAP214_RWAppliedDateAssignment;
|
||||
class RWStepAP214_RWAppliedApprovalAssignment;
|
||||
class RWStepAP214_RWAppliedGroupAssignment;
|
||||
class RWStepAP214_RWAppliedOrganizationAssignment;
|
||||
class RWStepAP214_RWAppliedPersonAndOrganizationAssignment;
|
||||
class RWStepAP214_RWAppliedPresentedItem;
|
||||
class RWStepAP214_RWAppliedSecurityClassificationAssignment;
|
||||
class RWStepAP214_RWAppliedDocumentReference;
|
||||
class RWStepAP214_RWAppliedExternalIdentificationAssignment;
|
||||
class RWStepAP214_RWClass;
|
||||
class RWStepAP214_RWExternallyDefinedClass;
|
||||
class RWStepAP214_RWExternallyDefinedGeneralProperty;
|
||||
class RWStepAP214_RWRepItemGroup;
|
||||
|
||||
|
||||
|
||||
class RWStepAP214
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
public:
|
||||
|
||||
//! enforced the initialisation of the libraries
|
||||
Standard_EXPORT static void Init();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class RWStepAP214_ReadWriteModule;
|
||||
friend class RWStepAP214_GeneralModule;
|
||||
friend class RWStepAP214_RWAutoDesignActualDateAndTimeAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignActualDateAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignApprovalAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignDateAndPersonAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignGroupAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignNominalDateAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignOrganizationAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignPresentedItem;
|
||||
friend class RWStepAP214_RWAutoDesignSecurityClassificationAssignment;
|
||||
friend class RWStepAP214_RWAutoDesignDocumentReference;
|
||||
friend class RWStepAP214_RWAppliedDateAndTimeAssignment;
|
||||
friend class RWStepAP214_RWAppliedDateAssignment;
|
||||
friend class RWStepAP214_RWAppliedApprovalAssignment;
|
||||
friend class RWStepAP214_RWAppliedGroupAssignment;
|
||||
friend class RWStepAP214_RWAppliedOrganizationAssignment;
|
||||
friend class RWStepAP214_RWAppliedPersonAndOrganizationAssignment;
|
||||
friend class RWStepAP214_RWAppliedPresentedItem;
|
||||
friend class RWStepAP214_RWAppliedSecurityClassificationAssignment;
|
||||
friend class RWStepAP214_RWAppliedDocumentReference;
|
||||
friend class RWStepAP214_RWAppliedExternalIdentificationAssignment;
|
||||
friend class RWStepAP214_RWClass;
|
||||
friend class RWStepAP214_RWExternallyDefinedClass;
|
||||
friend class RWStepAP214_RWExternallyDefinedGeneralProperty;
|
||||
friend class RWStepAP214_RWRepItemGroup;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _RWStepAP214_HeaderFile
|
||||
|
@@ -36,8 +36,6 @@ void RWStepShape_RWEdgeCurve::ReadStep
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_EdgeCurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,5,ach,"edge_curve")) return;
|
||||
@@ -120,18 +118,13 @@ void RWStepShape_RWEdgeCurve::Check
|
||||
const Interface_ShareTool& aShto,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
// cout << "------ calling CheckEdgeCurve ------" << endl;
|
||||
|
||||
Handle(StepShape_OrientedEdge) theOE1, theOE2;
|
||||
Handle(StepShape_FaceBound) theFOB1, theFOB2;
|
||||
//Handle(StepShape_FaceSurface) theFS1, theFS2;
|
||||
|
||||
Standard_Boolean theOEOri1 = Standard_True;
|
||||
Standard_Boolean theOEOri2 = Standard_True;
|
||||
Standard_Boolean theFBOri1 = Standard_True;
|
||||
Standard_Boolean theFBOri2 = Standard_True;
|
||||
//Standard_Boolean theFSOri1 = Standard_True;
|
||||
//Standard_Boolean theFSOri2 = Standard_True;
|
||||
Standard_Boolean Cumulated1, Cumulated2;
|
||||
|
||||
// 1- First Vertex != LastVertex but First VertexPoint == Last VertexPoint
|
||||
@@ -155,15 +148,14 @@ void RWStepShape_RWEdgeCurve::Check
|
||||
|
||||
if (!StartPoint.IsNull() && !EndPoint.IsNull()) {
|
||||
Standard_Real Dist = Sqrt
|
||||
((StartPoint->CoordinatesValue(1) - EndPoint->CoordinatesValue(1)) *
|
||||
(StartPoint->CoordinatesValue(1) - EndPoint->CoordinatesValue(1)) +
|
||||
(StartPoint->CoordinatesValue(2) - EndPoint->CoordinatesValue(2)) *
|
||||
(StartPoint->CoordinatesValue(2) - EndPoint->CoordinatesValue(2)) +
|
||||
(StartPoint->CoordinatesValue(3) - EndPoint->CoordinatesValue(3)) *
|
||||
(StartPoint->CoordinatesValue(3) - EndPoint->CoordinatesValue(3)));
|
||||
if (Dist < Precision::Confusion() ) {
|
||||
ach->AddWarning("Two instances of Vertex have equal (within uncertainty) coordinates");
|
||||
}
|
||||
((StartPoint->CoordinatesValue(1) - EndPoint->CoordinatesValue(1)) *
|
||||
(StartPoint->CoordinatesValue(1) - EndPoint->CoordinatesValue(1)) +
|
||||
(StartPoint->CoordinatesValue(2) - EndPoint->CoordinatesValue(2)) *
|
||||
(StartPoint->CoordinatesValue(2) - EndPoint->CoordinatesValue(2)) +
|
||||
(StartPoint->CoordinatesValue(3) - EndPoint->CoordinatesValue(3)) *
|
||||
(StartPoint->CoordinatesValue(3) - EndPoint->CoordinatesValue(3)));
|
||||
if (Dist < Precision::Confusion() )
|
||||
ach->AddWarning("Two instances of Vertex have equal (within uncertainty) coordinates");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,10 +167,10 @@ void RWStepShape_RWEdgeCurve::Check
|
||||
ach->AddFail("ERROR: EdgeCurve not referenced");
|
||||
}
|
||||
else {
|
||||
Interface_EntityIterator myShRef = aShto.Sharings(ent);
|
||||
Interface_EntityIterator myShRef = aShto.Graph().Sharings(ent);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_OrientedEdge),Standard_True);
|
||||
nbRef = myShRef.NbEntities();
|
||||
if (nbRef ==2) {
|
||||
if (nbRef == 2) {
|
||||
theOE1 = Handle(StepShape_OrientedEdge)::DownCast(myShRef.Value());
|
||||
theOEOri1 = theOE1->Orientation();
|
||||
myShRef.Next();
|
||||
@@ -188,110 +180,84 @@ void RWStepShape_RWEdgeCurve::Check
|
||||
// get the FaceBound orientation for theOE1
|
||||
|
||||
Standard_Boolean sharOE1 = aShto.IsShared(theOE1);
|
||||
if(!sharOE1){
|
||||
if(sharOE1) {
|
||||
myShRef = aShto.Graph().Sharings(theOE1);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_EdgeLoop),Standard_True);
|
||||
nbRef = myShRef.NbEntities();
|
||||
if (nbRef == 1) {
|
||||
myShRef.Start();
|
||||
Handle(StepShape_EdgeLoop) theEL1 = Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
|
||||
|
||||
Standard_Boolean sharEL1 = aShto.IsShared(theEL1);
|
||||
if(sharEL1) {
|
||||
myShRef = aShto.Graph().Sharings(theEL1);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_FaceBound),Standard_True);
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "OrientedEdge1 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theOE1);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_EdgeLoop),Standard_True);
|
||||
nbRef = myShRef.NbEntities();
|
||||
if (nbRef == 1) {
|
||||
myShRef.Start();
|
||||
Handle(StepShape_EdgeLoop) theEL1 =
|
||||
Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
|
||||
Standard_Boolean sharEL1 = aShto.IsShared(theEL1);
|
||||
if(!sharEL1) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "EdgeLoop1 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theEL1);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_FaceBound),Standard_True);
|
||||
#ifdef OCCT_DEBUG
|
||||
nbRef =
|
||||
#endif
|
||||
myShRef.NbEntities();
|
||||
myShRef.Start();
|
||||
theFOB1 = Handle(StepShape_FaceBound)::DownCast(myShRef.Value());
|
||||
if (!theFOB1.IsNull()) {
|
||||
theFBOri1 = theFOB1->Orientation();
|
||||
}
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "EdgeLoop not referenced by FaceBound" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (nbRef == 0) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "OrientedEdge not referenced" << endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if (aShto.NbTypedSharings(theOE1,
|
||||
STANDARD_TYPE(StepShape_EdgeLoop)) > 1) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "OrientedEdge referenced more than once" << endl;
|
||||
nbRef =
|
||||
#endif
|
||||
myShRef.NbEntities();
|
||||
myShRef.Start();
|
||||
theFOB1 = Handle(StepShape_FaceBound)::DownCast(myShRef.Value());
|
||||
if (!theFOB1.IsNull()) {
|
||||
theFBOri1 = theFOB1->Orientation();
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "EdgeLoop not referenced by FaceBound" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "EdgeLoop1 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
if (nbRef == 0)
|
||||
cout << "OrientedEdge not referenced" << endl;
|
||||
/*szv_c1:else if (aShto.NbTypedSharings(theOE1,STANDARD_TYPE(StepShape_EdgeLoop)) > 1)
|
||||
cout << "OrientedEdge referenced more than once" << endl;*/
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "OrientedEdge1 not shared" <<endl;
|
||||
#endif
|
||||
|
||||
// get the FaceBound orientation for theOE2
|
||||
|
||||
Standard_Boolean sharOE2 = aShto.IsShared(theOE2);
|
||||
if(!sharOE2){
|
||||
if (sharOE2) {
|
||||
myShRef = aShto.Graph().Sharings(theOE2);
|
||||
myShRef.Start();
|
||||
Handle(StepShape_EdgeLoop) theEL2 =
|
||||
Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
|
||||
Standard_Boolean sharEL2 = aShto.IsShared(theEL2);
|
||||
if (sharEL2) {
|
||||
myShRef = aShto.Graph().Sharings(theEL2);
|
||||
myShRef.Start();
|
||||
theFOB2 = Handle(StepShape_FaceBound)::DownCast(myShRef.Value());
|
||||
if (!theFOB2.IsNull())
|
||||
theFBOri2 = theFOB2->Orientation();
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "OrientedEdge2 not shared" <<endl;
|
||||
else cout << "EdgeLoop not referenced by FaceBound" << endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "EdgeLoop2 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theOE2);
|
||||
#ifdef OCCT_DEBUG
|
||||
// Standard_Integer nbRef =
|
||||
else cout << "OrientedEdge2 not shared" <<endl;
|
||||
#endif
|
||||
// unused myShRef.NbEntities();
|
||||
myShRef.Start();
|
||||
Handle(StepShape_EdgeLoop) theEL2 =
|
||||
Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
|
||||
Standard_Boolean sharEL2 = aShto.IsShared(theEL2);
|
||||
if(!sharEL2){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "EdgeLoop2 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theEL2);
|
||||
// unused Standard_Integer nbRef = myShRef.NbEntities();
|
||||
myShRef.Start();
|
||||
theFOB2 = Handle(StepShape_FaceBound)::DownCast(myShRef.Value());
|
||||
if (!theFOB2.IsNull()) {
|
||||
theFBOri2 = theFOB2->Orientation();
|
||||
}
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "EdgeLoop not referenced by FaceBound" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// "cumulate" the FaceBound and the OrientedEdge orientation
|
||||
// "cumulate" the FaceBound and the OrientedEdge orientation
|
||||
|
||||
Cumulated1 = theFBOri1 ^ theOEOri1;
|
||||
Cumulated1 = theFBOri1 ^ theOEOri1;
|
||||
Cumulated2 = theFBOri2 ^ theOEOri2;
|
||||
|
||||
// the orientation of the OrientedEdges must be opposite
|
||||
|
||||
if (Cumulated1 == Cumulated2) {
|
||||
ach->AddFail("ERROR: non 2-manifold topology");
|
||||
}
|
||||
if (Cumulated1 == Cumulated2)
|
||||
ach->AddFail("ERROR: non 2-manifold topology");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ void RWStepShape_RWFaceBound::Check
|
||||
for(Standard_Integer i=1; i<=nbEdg; i++) {
|
||||
Handle(StepShape_OrientedEdge) theOE1 = theEL1->EdgeListValue(i);
|
||||
Handle(StepShape_Edge) theEdg1 = theOE1->EdgeElement();
|
||||
Interface_EntityIterator myShRef = aShto.Sharings(theEdg1);
|
||||
Interface_EntityIterator myShRef = aShto.Graph().Sharings(theEdg1);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_OrientedEdge),Standard_True);
|
||||
Standard_Integer nbRef = myShRef.NbEntities();
|
||||
if(nbRef == 1) {
|
||||
@@ -129,7 +129,7 @@ void RWStepShape_RWFaceBound::Check
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theOE2);
|
||||
myShRef = aShto.Graph().Sharings(theOE2);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_EdgeLoop),Standard_True);
|
||||
myShRef.Start();
|
||||
Handle(StepShape_EdgeLoop) theEL2 =
|
||||
@@ -141,7 +141,7 @@ void RWStepShape_RWFaceBound::Check
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theEL2);
|
||||
myShRef = aShto.Graph().Sharings(theEL2);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_FaceBound),Standard_True);
|
||||
myShRef.Start();
|
||||
Handle(StepShape_FaceBound) theFB2 =
|
||||
|
@@ -15,7 +15,6 @@
|
||||
|
||||
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <STEPCAFControl_ActorWrite.hxx>
|
||||
#include <STEPCAFControl_Controller.hxx>
|
||||
#include <XSAlgo.hxx>
|
||||
@@ -26,10 +25,10 @@ IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_Controller,STEPControl_Controller)
|
||||
//function : STEPCAFControl_Controller
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
STEPCAFControl_Controller::STEPCAFControl_Controller ()
|
||||
{
|
||||
Handle(STEPCAFControl_ActorWrite) ActWrite = new STEPCAFControl_ActorWrite;
|
||||
myAdaptorWrite = ActWrite;
|
||||
myAdaptorWrite = new STEPCAFControl_ActorWrite;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -37,10 +36,10 @@ STEPCAFControl_Controller::STEPCAFControl_Controller ()
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean STEPCAFControl_Controller::Init ()
|
||||
void STEPCAFControl_Controller::Init ()
|
||||
{
|
||||
static Standard_Boolean inic = Standard_False;
|
||||
if (inic) return Standard_True;
|
||||
if (inic) return;
|
||||
inic = Standard_True;
|
||||
// self-registering
|
||||
Handle(STEPCAFControl_Controller) STEPCTL = new STEPCAFControl_Controller;
|
||||
@@ -68,6 +67,4 @@ Standard_Boolean STEPCAFControl_Controller::Init ()
|
||||
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval Off"); // 0
|
||||
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval On"); // 1
|
||||
Interface_Static::SetIVal("read.stepcaf.subshapes.name", 0); // Disabled by default
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <STEPControl_Controller.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
|
||||
class STEPCAFControl_Controller;
|
||||
@@ -32,39 +31,19 @@ DEFINE_STANDARD_HANDLE(STEPCAFControl_Controller, STEPControl_Controller)
|
||||
//! (inherited automatically)
|
||||
class STEPCAFControl_Controller : public STEPControl_Controller
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Initializes the use of STEP Norm (the first time)
|
||||
Standard_EXPORT STEPCAFControl_Controller();
|
||||
public:
|
||||
|
||||
//! Standard Initialisation. It creates a Controller for STEP-XCAF
|
||||
//! and records it to various names, available to select it later
|
||||
//! Returns True when done, False if could not be done
|
||||
Standard_EXPORT static Standard_Boolean Init();
|
||||
|
||||
|
||||
|
||||
Standard_EXPORT static void Init();
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(STEPCAFControl_Controller,STEPControl_Controller)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
//! Initializes the use of STEP Norm (the first time)
|
||||
Standard_EXPORT STEPCAFControl_Controller();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _STEPCAFControl_Controller_HeaderFile
|
||||
|
@@ -4,8 +4,12 @@ STEPControl_ActorWrite.cxx
|
||||
STEPControl_ActorWrite.hxx
|
||||
STEPControl_Controller.cxx
|
||||
STEPControl_Controller.hxx
|
||||
STEPControl_FloatFormat.cxx
|
||||
STEPControl_FloatFormat.hxx
|
||||
STEPControl_Reader.cxx
|
||||
STEPControl_Reader.hxx
|
||||
STEPControl_StepModelType.hxx
|
||||
STEPControl_WorkLibrary.cxx
|
||||
STEPControl_WorkLibrary.hxx
|
||||
STEPControl_Writer.cxx
|
||||
STEPControl_Writer.hxx
|
||||
|
@@ -263,7 +263,7 @@ Standard_Boolean STEPControl_ActorRead::Recognize (const Handle(Standard_Transie
|
||||
// mapping
|
||||
// ============================================================================
|
||||
|
||||
Handle(Transfer_Binder) STEPControl_ActorRead::Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForTransient)& TP)
|
||||
Handle(Transfer_Binder) STEPControl_ActorRead::Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_Process)& TP)
|
||||
{
|
||||
// [BEGIN] Get version of preprocessor (to detect I-Deas case) (ssv; 23.11.2010)
|
||||
Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast ( TP->Model() );
|
||||
@@ -1426,7 +1426,6 @@ Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape(const Handle(Standa
|
||||
Handle(Message_Messenger) sout = TP->Messenger();
|
||||
#ifdef TRANSLOG
|
||||
// POUR MISE AU POINT, a supprimer ensuite
|
||||
// sout<<"STEP->Shape, ent n0 "<<TP->Model()->Number(start)<<" Level="<<TP->NestingLevel()<<endl;
|
||||
if (TP->TraceLevel() > 1)
|
||||
sout<<" -- Actor : Transfer Ent.n0 "<<TP->Model()->Number(start)<<" Type "<<start->DynamicType()->Name()<<endl;
|
||||
#endif
|
||||
|
@@ -58,7 +58,7 @@ class STEPControl_ActorRead : public Transfer_ActorOfTransientProcess
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Standard_Transient)& start) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForTransient)& TP) Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_Process)& TP) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) TransferShape (const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP, const Standard_Boolean isManifold = Standard_True);
|
||||
|
||||
|
@@ -404,7 +404,7 @@ Standard_Boolean STEPControl_ActorWrite::Recognize (const Handle(Standard_Transi
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Transfer_Binder) STEPControl_ActorWrite::Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForFinder)& FP)
|
||||
Handle(Transfer_Binder) STEPControl_ActorWrite::Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_Process)& FP)
|
||||
{
|
||||
XSAlgo::AlgoContainer()->PrepareForTransfer();
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user