mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
179
src/TransferBRep/TransferBRep.cdl
Executable file
179
src/TransferBRep/TransferBRep.cdl
Executable file
@@ -0,0 +1,179 @@
|
||||
-- File: TransferBRep.cdl
|
||||
-- Created: Mon Oct 3 10:03:04 1994
|
||||
-- Author: Christian CAILLET
|
||||
-- <cky@stylox>
|
||||
---Copyright: Matra Datavision 1994
|
||||
|
||||
|
||||
package TransferBRep
|
||||
|
||||
---Purpose : This package gathers services to simply read files and convert
|
||||
-- them to Shapes from CasCade. IE. it can be used in conjunction
|
||||
-- with purely CasCade software
|
||||
|
||||
uses Standard, TCollection, TColStd, TopoDS, TopAbs, TopTools, Interface, Transfer, Message
|
||||
|
||||
is
|
||||
|
||||
class Reader;
|
||||
|
||||
-- class Analyzer;
|
||||
|
||||
class ShapeInfo;
|
||||
class BinderOfShape instantiates SimpleBinder from Transfer
|
||||
(Shape from TopoDS, ShapeInfo);
|
||||
|
||||
class ShapeBinder;
|
||||
class ShapeListBinder;
|
||||
|
||||
class ShapeMapper instantiates Mapper from Transfer
|
||||
(Shape from TopoDS, ShapeMapHasher from TopTools, ShapeInfo);
|
||||
class OrientedShapeMapper instantiates Mapper from Transfer
|
||||
(Shape from TopoDS, OrientedShapeMapHasher from TopTools, ShapeInfo);
|
||||
|
||||
class TransferResultInfo;
|
||||
class SequenceOfTransferResultInfo instantiates Sequence from TCollection
|
||||
(TransferResultInfo from TransferBRep);
|
||||
class HSequenceOfTransferResultInfo instantiates HSequence from TCollection
|
||||
(TransferResultInfo from TransferBRep,
|
||||
SequenceOfTransferResultInfo from TransferBRep);
|
||||
|
||||
-- some usefull functions for binding shapes --
|
||||
|
||||
ShapeResult (binder : Binder from Transfer) returns Shape from TopoDS;
|
||||
---Purpose : Get the Shape recorded in a Binder
|
||||
-- If the Binder brings a multiple result, search for the Shape
|
||||
|
||||
ShapeResult (TP : TransientProcess from Transfer; ent : Transient)
|
||||
returns Shape from TopoDS;
|
||||
---Purpose : Get the Shape recorded in a TransientProcess as result of the
|
||||
-- Transfer of an entity. I.E. in the binder bound to that Entity
|
||||
-- If no result or result not a single Shape, returns a Null Shape
|
||||
|
||||
SetShapeResult (TP : mutable TransientProcess from Transfer; ent : Transient;
|
||||
result : Shape from TopoDS);
|
||||
---Purpose : Sets a Shape as a result for a starting entity <ent>
|
||||
-- (reverse of ShapeResult)
|
||||
-- It simply creates a ShapeBinder then binds it to the entity
|
||||
|
||||
Shapes (TP : TransientProcess from Transfer; rootsonly : Boolean = Standard_True)
|
||||
returns HSequenceOfShape from TopTools;
|
||||
---Purpose : Gets the Shapes recorded in a TransientProcess as result of a
|
||||
-- Transfer, considers roots only or all results according
|
||||
-- <rootsonly>, returns them as a HSequence
|
||||
|
||||
Shapes (TP : TransientProcess from Transfer;
|
||||
list : HSequenceOfTransient from TColStd)
|
||||
returns HSequenceOfShape from TopTools;
|
||||
---Purpose : Gets the Shapes recorded in a TransientProcess as result of a
|
||||
-- Transfer, for a given list of starting entities, returns
|
||||
-- the shapes as a HSequence
|
||||
|
||||
|
||||
ShapeState (FP : FinderProcess from Transfer; shape : Shape from TopoDS)
|
||||
returns Orientation from TopAbs;
|
||||
---Purpose : Returns a Status regarding a Shape in a FinderProcess
|
||||
-- - FORWARD means bound with SAME Orientation
|
||||
-- - REVERSED means bound with REVERSE Orientation
|
||||
-- - EXTERNAL means NOT BOUND
|
||||
-- - INTERNAL is not used
|
||||
|
||||
ResultFromShape (FP : FinderProcess from Transfer; shape : Shape from TopoDS)
|
||||
returns Binder from Transfer;
|
||||
---Purpose : Returns the result (as a Binder) attached to a given Shape
|
||||
-- Null if none
|
||||
|
||||
TransientFromShape (FP : FinderProcess from Transfer; shape : Shape from TopoDS)
|
||||
returns Transient;
|
||||
---Purpose : Returns the result as pure Transient attached to a Shape
|
||||
-- first one if multiple result
|
||||
|
||||
SetTransientFromShape (FP : FinderProcess from Transfer;
|
||||
shape : Shape from TopoDS; result : Transient);
|
||||
---Purpose : Binds a Transient Result to a Shape in a FinderProcess
|
||||
-- (as first result if multiple : does not add it to existing one)
|
||||
|
||||
ShapeMapper (FP : FinderProcess from Transfer; shape : Shape from TopoDS)
|
||||
returns ShapeMapper;
|
||||
---Purpose : Returns a ShapeMapper for a given Shape (location included)
|
||||
-- Either <shape> is already mapped, then its Mapper is returned
|
||||
-- Or it is not, then a new one is created then returned, BUT
|
||||
-- it is not mapped here (use Bind or FindElseBind to do this)
|
||||
|
||||
-- Functions to collect transfer result information --
|
||||
|
||||
TransferResultInfo (TP : TransientProcess from Transfer;
|
||||
EntityTypes: HSequenceOfTransient from TColStd;
|
||||
InfoSeq : out HSequenceOfTransferResultInfo from TransferBRep);
|
||||
---Purpose: Fills sequence of TransferResultInfo for each type of entity
|
||||
-- given in the EntityTypes (entity are given as objects).
|
||||
-- Method IsKind applied to the entities in TP is used to
|
||||
-- compare with entities in EntityTypes.
|
||||
-- TopAbs_ShapeEnum).
|
||||
|
||||
TransferResultInfo (FP : FinderProcess from Transfer;
|
||||
ShapeTypes: HSequenceOfInteger from TColStd;
|
||||
InfoSeq : out HSequenceOfTransferResultInfo from TransferBRep);
|
||||
---Purpose: Fills sequence of TransferResultInfo for each type of shape
|
||||
-- given in the ShapeTypes (which are in fact considered as
|
||||
-- TopAbs_ShapeEnum).
|
||||
-- The Finders in the FP are considered as ShapeMappers.
|
||||
|
||||
PrintResultInfo ( Printer : Printer from Message;
|
||||
Header : Msg from Message;
|
||||
ResultInfo: TransferResultInfo from TransferBRep;
|
||||
printEmpty: Boolean = Standard_True);
|
||||
---Purpose: Prints the results of transfer to given priner with given header.
|
||||
|
||||
|
||||
|
||||
-- Functions to analyse checks on objects, shapes ... --
|
||||
|
||||
BRepCheck (shape : Shape from TopoDS; lev : Integer = 1)
|
||||
returns CheckIterator from Interface;
|
||||
---Purpose : Performs a heavy check by calling the Analyser from BRepCheck
|
||||
-- This tool computes a lot of informations about integrity of a
|
||||
-- Shape. This method uses it and converts its internal result
|
||||
-- to a classic check-list.
|
||||
-- <lev> allows to get more informations :
|
||||
-- 0 : BRepCheck only
|
||||
-- 1(D) + Curves/Surfaces not C0 ; 2 + SameParameter on Edges
|
||||
-- Warning : entities to which checks are bound are the Shapes themselves,
|
||||
-- embedded in ShapeMapper
|
||||
|
||||
ResultCheckList (chl : CheckIterator from Interface;
|
||||
FP : FinderProcess from Transfer;
|
||||
model : InterfaceModel from Interface)
|
||||
returns CheckIterator from Interface;
|
||||
---Purpose : Takes a starting CheckIterator which brings checks bound with
|
||||
-- starting objects (Shapes, Transient from an Imagine appli ...)
|
||||
-- and converts it to a CheckIterator in which checks are bound
|
||||
-- with results in an InterfaceModel
|
||||
-- Mapping is recorded in the FinderProcess
|
||||
-- Starting objects for which no individual result is recorded
|
||||
-- remain in their state
|
||||
|
||||
Checked (chl : CheckIterator from Interface;
|
||||
alsoshapes : Boolean = Standard_False)
|
||||
returns HSequenceOfTransient from TColStd;
|
||||
---Purpose : Returns the list of objects to which a non-empty Check is
|
||||
-- bound in a check-list. Objects are transients, they can then
|
||||
-- be either Imagine objects entities for an Interface Norm.
|
||||
-- <alsoshapes> commands Shapes to be returned too
|
||||
-- (as ShapeMapper), see also CheckedShapes
|
||||
|
||||
CheckedShapes (chl : CheckIterator from Interface)
|
||||
returns HSequenceOfShape from TopTools;
|
||||
---Purpose : Returns the list of shapes to which a non-empty Check is bound
|
||||
-- in a check-list
|
||||
|
||||
CheckObject (chl : CheckIterator from Interface; obj : Transient)
|
||||
returns CheckIterator from Interface;
|
||||
---Purpose : Returns the check-list bound to a given object, generally none
|
||||
-- (if OK) or one check. <obj> can be, either a true Transient
|
||||
-- object or entity, or a ShapeMapper, in that case the Shape is
|
||||
-- considered
|
||||
|
||||
-- Complementary helps
|
||||
|
||||
end TransferBRep;
|
477
src/TransferBRep/TransferBRep.cxx
Executable file
477
src/TransferBRep/TransferBRep.cxx
Executable file
@@ -0,0 +1,477 @@
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <TransferBRep.ixx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
#include <TransferBRep_BinderOfShape.hxx>
|
||||
#include <TransferBRep_ShapeListBinder.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <TopoDS_HShape.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <TransferBRep_ShapeBinder.hxx>
|
||||
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#include <TransferBRep_ShapeMapper.hxx>
|
||||
#include <TransferBRep_TransferResultInfo.hxx>
|
||||
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
//#include <TransferBRep_Analyzer.hxx>
|
||||
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static void ShapeAppend
|
||||
(const Handle(Transfer_Binder)& binder,
|
||||
const Handle(TopTools_HSequenceOfShape)& shapes)
|
||||
{
|
||||
if (binder.IsNull()) return;
|
||||
if (binder->IsKind(STANDARD_TYPE(TransferBRep_BinderOfShape))) {
|
||||
DeclareAndCast(TransferBRep_BinderOfShape,shbind,binder);
|
||||
if (shbind->HasResult()) shapes->Append (shbind->Result());
|
||||
}
|
||||
else if (binder->IsKind(STANDARD_TYPE(TransferBRep_ShapeListBinder))) {
|
||||
DeclareAndCast(TransferBRep_ShapeListBinder,slbind,binder);
|
||||
Standard_Integer i,nb = slbind->NbShapes();
|
||||
for (i = 1; i <= nb; i ++) shapes->Append (slbind->Shape(i));
|
||||
}
|
||||
else if (binder->IsKind(STANDARD_TYPE(Transfer_SimpleBinderOfTransient))) {
|
||||
DeclareAndCast(Transfer_SimpleBinderOfTransient,trbind,binder);
|
||||
DeclareAndCast(TopoDS_HShape,hs,trbind->Result());
|
||||
if (!hs.IsNull()) shapes->Append (hs->Shape());
|
||||
}
|
||||
Handle(Transfer_Binder) nextr = binder->NextResult();
|
||||
if (!nextr.IsNull()) ShapeAppend (nextr,shapes);
|
||||
}
|
||||
|
||||
|
||||
TopoDS_Shape TransferBRep::ShapeResult
|
||||
(const Handle(Transfer_Binder)& binder)
|
||||
{
|
||||
TopoDS_Shape shape;
|
||||
Handle(Transfer_Binder) bnd = binder;
|
||||
while (!bnd.IsNull()) {
|
||||
DeclareAndCast(TransferBRep_BinderOfShape,shb,bnd);
|
||||
if (!shb.IsNull()) return shb->Result();
|
||||
DeclareAndCast(Transfer_SimpleBinderOfTransient,hsb,bnd);
|
||||
if (!hsb.IsNull()) {
|
||||
Handle(TopoDS_HShape) hsp = GetCasted(TopoDS_HShape,hsb->Result());
|
||||
if (!hsp.IsNull()) return hsp->Shape();
|
||||
}
|
||||
bnd = bnd->NextResult();
|
||||
}
|
||||
return shape;
|
||||
}
|
||||
|
||||
TopoDS_Shape TransferBRep::ShapeResult
|
||||
(const Handle(Transfer_TransientProcess)& TP,
|
||||
const Handle(Standard_Transient)& ent)
|
||||
{
|
||||
TopoDS_Shape shape;
|
||||
Handle(Transfer_Binder) binder = TP->Find(ent);
|
||||
if (binder.IsNull()) binder = GetCasted (Transfer_Binder,ent);
|
||||
if (!binder.IsNull()) return TransferBRep::ShapeResult (binder);
|
||||
DeclareAndCast(TopoDS_HShape,hsp,ent);
|
||||
if (!hsp.IsNull()) return hsp->Shape();
|
||||
return shape;
|
||||
}
|
||||
|
||||
|
||||
void TransferBRep::SetShapeResult
|
||||
(const Handle(Transfer_TransientProcess)& TP,
|
||||
const Handle(Standard_Transient)& ent, const TopoDS_Shape& result)
|
||||
{
|
||||
if (result.IsNull() || ent.IsNull() || TP.IsNull()) return;
|
||||
TP->Bind (ent,new TransferBRep_ShapeBinder(result));
|
||||
}
|
||||
|
||||
|
||||
Handle(TopTools_HSequenceOfShape) TransferBRep::Shapes
|
||||
(const Handle(Transfer_TransientProcess)& TP, const Standard_Boolean roots)
|
||||
{
|
||||
Handle(TopTools_HSequenceOfShape) shapes;
|
||||
if (TP.IsNull()) return shapes;
|
||||
shapes = new TopTools_HSequenceOfShape();
|
||||
|
||||
Transfer_IteratorOfProcessForTransient list =
|
||||
(roots ? TP->RootResult() : TP->CompleteResult());
|
||||
|
||||
for (list.Start(); list.More(); list.Next()) {
|
||||
Handle(Transfer_Binder) binder = list.Value();
|
||||
ShapeAppend (binder,shapes);
|
||||
}
|
||||
return shapes;
|
||||
}
|
||||
|
||||
Handle(TopTools_HSequenceOfShape) TransferBRep::Shapes
|
||||
(const Handle(Transfer_TransientProcess)& TP,
|
||||
const Handle(TColStd_HSequenceOfTransient)& list)
|
||||
{
|
||||
Handle(TopTools_HSequenceOfShape) shapes;
|
||||
if (TP.IsNull() && list.IsNull()) return shapes;
|
||||
shapes = new TopTools_HSequenceOfShape();
|
||||
|
||||
Standard_Integer ie, ne = list->Length();
|
||||
for (ie = 1; ie <= ne; ie ++) {
|
||||
Handle(Transfer_Binder) binder = TP->Find(list->Value(ie));
|
||||
ShapeAppend (binder,shapes);
|
||||
}
|
||||
|
||||
return shapes;
|
||||
}
|
||||
|
||||
|
||||
TopAbs_Orientation TransferBRep::ShapeState
|
||||
(const Handle(Transfer_FinderProcess)& FP, const TopoDS_Shape& shape)
|
||||
{
|
||||
if (FP.IsNull() || shape.IsNull()) return TopAbs_EXTERNAL;
|
||||
Handle(TransferBRep_ShapeMapper) sm = new TransferBRep_ShapeMapper(shape);
|
||||
Standard_Integer index = FP->MapIndex (sm);
|
||||
if (index == 0) return TopAbs_EXTERNAL;
|
||||
sm = Handle(TransferBRep_ShapeMapper)::DownCast(FP->Mapped(index));
|
||||
if (sm.IsNull()) return TopAbs_EXTERNAL;
|
||||
const TopoDS_Shape& mapped = sm->Value();
|
||||
// l egalite est assumee, on ne teste que l orientation
|
||||
if (mapped.Orientation() != shape.Orientation()) return TopAbs_REVERSED;
|
||||
return TopAbs_FORWARD;
|
||||
}
|
||||
|
||||
Handle(Transfer_Binder) TransferBRep::ResultFromShape
|
||||
(const Handle(Transfer_FinderProcess)& FP, const TopoDS_Shape& shape)
|
||||
{
|
||||
Handle(Transfer_Binder) res;
|
||||
if (FP.IsNull() || shape.IsNull()) return res;
|
||||
Handle(TransferBRep_ShapeMapper) sm = new TransferBRep_ShapeMapper(shape);
|
||||
return FP->Find (sm);
|
||||
}
|
||||
|
||||
Handle(Standard_Transient) TransferBRep::TransientFromShape
|
||||
(const Handle(Transfer_FinderProcess)& FP, const TopoDS_Shape& shape)
|
||||
{
|
||||
Handle(Standard_Transient) res;
|
||||
if (FP.IsNull() || shape.IsNull()) return res;
|
||||
Handle(TransferBRep_ShapeMapper) sm = new TransferBRep_ShapeMapper(shape);
|
||||
return FP->FindTransient (sm);
|
||||
}
|
||||
|
||||
|
||||
void TransferBRep::SetTransientFromShape
|
||||
(const Handle(Transfer_FinderProcess)& FP,
|
||||
const TopoDS_Shape& shape, const Handle(Standard_Transient)& result)
|
||||
{
|
||||
if (FP.IsNull() || shape.IsNull()) return;
|
||||
Handle(TransferBRep_ShapeMapper) sm = new TransferBRep_ShapeMapper(shape);
|
||||
FP->BindTransient (sm,result);
|
||||
}
|
||||
|
||||
Handle(TransferBRep_ShapeMapper) TransferBRep::ShapeMapper
|
||||
(const Handle(Transfer_FinderProcess)& FP,
|
||||
const TopoDS_Shape& shape)
|
||||
{
|
||||
Handle(TransferBRep_ShapeMapper) mapper = new TransferBRep_ShapeMapper(shape);
|
||||
Standard_Integer index = FP->MapIndex (mapper);
|
||||
if (index == 0) return mapper;
|
||||
return Handle(TransferBRep_ShapeMapper)::DownCast(FP->Mapped(index));
|
||||
}
|
||||
|
||||
// Functions to collect transfer result information
|
||||
|
||||
//=======================================================================
|
||||
//function : FillInfo
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
static void FillInfo (const Handle(Transfer_Binder)& Binder,
|
||||
const Handle(Interface_Check)& Check,
|
||||
const Handle(TransferBRep_TransferResultInfo)& Info)
|
||||
{
|
||||
Standard_Integer R = 0, RW = 0, RF = 0, RWF = 0, NR = 0, NRW = 0, NRF = 0, NRWF = 0;
|
||||
if (Binder->HasResult())
|
||||
if (Check->HasWarnings() && Check->HasFailed()) RWF++;
|
||||
else if (Check->HasWarnings()) RW++;
|
||||
else if (Check->HasFailed()) RF++;
|
||||
else R++;
|
||||
else
|
||||
if (Check->HasWarnings() && Check->HasFailed()) NRWF++;
|
||||
else if (Check->HasWarnings()) NRW++;
|
||||
else if (Check->HasFailed()) NRF++;
|
||||
else NR++;
|
||||
Info->Result() += R; Info->ResultWarning() += RW; Info->ResultFail() += RF; Info->ResultWarningFail() += RWF;
|
||||
Info->NoResult() += NR; Info->NoResultWarning() += NRW; Info->NoResultFail() += NRF; Info->NoResultWarningFail() += NRWF;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : TransferResultInfo
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TransferBRep::TransferResultInfo (const Handle(Transfer_TransientProcess)& TP,
|
||||
const Handle(TColStd_HSequenceOfTransient)& EntityTypes,
|
||||
Handle(TransferBRep_HSequenceOfTransferResultInfo)& InfoSeq)
|
||||
{
|
||||
// create output Sequence in accordance with required ShapeTypes
|
||||
InfoSeq = new TransferBRep_HSequenceOfTransferResultInfo;
|
||||
if (TP.IsNull() || EntityTypes.IsNull()) return;
|
||||
Standard_Integer SeqLen = EntityTypes->Length();
|
||||
Standard_Integer i; // svv Jan11 2000 : porting on DEC
|
||||
for (i = 1; i <= SeqLen; i++) {
|
||||
InfoSeq->Append (new TransferBRep_TransferResultInfo);
|
||||
}
|
||||
|
||||
// fill Sequence
|
||||
Standard_Integer NbMapped = TP->NbMapped();
|
||||
for (i = 1; i <= NbMapped; i++) {
|
||||
Handle(Standard_Transient) Entity = TP->Mapped (i);
|
||||
|
||||
Handle(Transfer_Binder) Binder = TP->Find (Entity);
|
||||
if (Binder.IsNull()) continue;
|
||||
const Handle(Interface_Check) Check = Binder->Check ();
|
||||
|
||||
// find appropriate element in the Sequence
|
||||
for (Standard_Integer index = 1; index <= SeqLen; index++) {
|
||||
if (Entity->IsKind (EntityTypes->Value(index)->DynamicType())) {
|
||||
Handle(TransferBRep_TransferResultInfo) Info = InfoSeq->Value (index);
|
||||
// fill element
|
||||
FillInfo (Binder, Check, Info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : TransferResultInfo
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TransferBRep::TransferResultInfo (const Handle(Transfer_FinderProcess)& FP,
|
||||
const Handle(TColStd_HSequenceOfInteger)& ShapeTypes,
|
||||
Handle(TransferBRep_HSequenceOfTransferResultInfo)& InfoSeq)
|
||||
{
|
||||
// create output Sequence in accordance with required ShapeTypes
|
||||
InfoSeq = new TransferBRep_HSequenceOfTransferResultInfo;
|
||||
if (FP.IsNull() || ShapeTypes.IsNull()) return;
|
||||
Standard_Integer SeqLen = ShapeTypes->Length();
|
||||
Standard_Integer i; // svv Jan11 2000 : porting on DEC
|
||||
for (i = 1; i <= SeqLen; i++) {
|
||||
InfoSeq->Append (new TransferBRep_TransferResultInfo);
|
||||
}
|
||||
|
||||
// fill Sequence
|
||||
Standard_Integer NbMapped = FP->NbMapped();
|
||||
for (i = 1; i <= NbMapped; i++) {
|
||||
Handle(TransferBRep_ShapeMapper) Mapper = Handle(TransferBRep_ShapeMapper)::DownCast (FP->Mapped (i));
|
||||
Handle(Transfer_Binder) Binder = FP->Find (Mapper);
|
||||
if (Binder.IsNull()) continue;
|
||||
const Handle(Interface_Check) Check = Binder->Check ();
|
||||
|
||||
TopoDS_Shape S = Mapper->Value();
|
||||
TopAbs_ShapeEnum ShapeType = S.ShapeType();
|
||||
|
||||
// find appropriate element in the Sequence
|
||||
for (Standard_Integer index = 1; index <= SeqLen; index++) {
|
||||
//JR/Hp :
|
||||
TopAbs_ShapeEnum CurrentType = (TopAbs_ShapeEnum)ShapeTypes->Value (index);
|
||||
// TopAbs_ShapeEnum CurrentType = (TopAbs_ShapeEnum)ShapeTypes->Value (index);
|
||||
if (CurrentType == ShapeType || CurrentType == TopAbs_SHAPE) {
|
||||
Handle(TransferBRep_TransferResultInfo) Info = InfoSeq->Value (index);
|
||||
// fill element
|
||||
FillInfo (Binder, Check, Info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ######## CHECK LOURD ########
|
||||
|
||||
// # # # # # # Enchainement General du CHECK LOURD # # # # # #
|
||||
|
||||
/*
|
||||
Interface_CheckIterator TransferBRep::BRepCheck
|
||||
(const TopoDS_Shape& shape, const Standard_Integer lev)
|
||||
{
|
||||
Interface_CheckIterator result;
|
||||
TransferBRep_Analyzer ana;
|
||||
ana.Check (shape,lev);
|
||||
return ana.CheckResult ();
|
||||
}
|
||||
*/
|
||||
|
||||
// ### conversion resultat -> starting
|
||||
|
||||
Interface_CheckIterator TransferBRep::ResultCheckList
|
||||
(const Interface_CheckIterator& chl,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const Handle(Interface_InterfaceModel)& model)
|
||||
{
|
||||
Interface_CheckIterator nchl;
|
||||
if (FP.IsNull() || model.IsNull()) return nchl;
|
||||
nchl.SetModel(model);
|
||||
for (chl.Start(); chl.More(); chl.Next()) {
|
||||
Standard_Integer num = 0;
|
||||
Handle(Interface_Check) ach = chl.Value();
|
||||
if (ach->NbFails() + ach->NbWarnings() == 0) continue;
|
||||
DeclareAndCast(Transfer_Finder,starting,ach->Entity());
|
||||
Handle(Standard_Transient) ent;
|
||||
if (!starting.IsNull()) ent = FP->FindTransient(starting);
|
||||
if (!ent.IsNull()) {
|
||||
ach->SetEntity(ent);
|
||||
num = model->Number(ent);
|
||||
}
|
||||
nchl.Add (ach,num);
|
||||
}
|
||||
return nchl;
|
||||
}
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) TransferBRep::Checked
|
||||
(const Interface_CheckIterator& chl, const Standard_Boolean alsoshapes)
|
||||
{
|
||||
Handle(TColStd_HSequenceOfTransient) ls = new TColStd_HSequenceOfTransient();
|
||||
for (chl.Start(); chl.More(); chl.Next()) {
|
||||
const Handle(Interface_Check) ach = chl.Value();
|
||||
if (ach->NbFails() + ach->NbWarnings() == 0) continue;
|
||||
Handle(Standard_Transient) ent = ach->Entity();
|
||||
if (ent.IsNull()) continue;
|
||||
if (!alsoshapes) {
|
||||
if (ent->IsKind(STANDARD_TYPE(TransferBRep_BinderOfShape)) ||
|
||||
ent->IsKind(STANDARD_TYPE(TopoDS_HShape)) ||
|
||||
ent->IsKind(STANDARD_TYPE(TransferBRep_ShapeMapper)) ) continue;
|
||||
}
|
||||
ls->Append(ent);
|
||||
}
|
||||
return ls;
|
||||
}
|
||||
|
||||
Handle(TopTools_HSequenceOfShape) TransferBRep::CheckedShapes
|
||||
(const Interface_CheckIterator& chl)
|
||||
{
|
||||
Handle(TopTools_HSequenceOfShape) ls = new TopTools_HSequenceOfShape();
|
||||
for (chl.Start(); chl.More(); chl.Next()) {
|
||||
const Handle(Interface_Check) ach = chl.Value();
|
||||
if (ach->NbFails() + ach->NbWarnings() == 0) continue;
|
||||
Handle(Standard_Transient) ent = ach->Entity();
|
||||
if (ent.IsNull()) continue;
|
||||
DeclareAndCast(TopoDS_HShape,hs,ent);
|
||||
DeclareAndCast(TransferBRep_BinderOfShape,sb,ent);
|
||||
DeclareAndCast(TransferBRep_ShapeMapper,sm,ent);
|
||||
if (!hs.IsNull()) ls->Append (hs->Shape());
|
||||
if (!sb.IsNull()) ls->Append (sb->Result());
|
||||
if (!sm.IsNull()) ls->Append (sm->Value());
|
||||
}
|
||||
return ls;
|
||||
}
|
||||
|
||||
Interface_CheckIterator TransferBRep::CheckObject
|
||||
(const Interface_CheckIterator& chl, const Handle(Standard_Transient)& obj)
|
||||
{
|
||||
TopoDS_Shape S;
|
||||
DeclareAndCast(TopoDS_HShape,hs,obj);
|
||||
DeclareAndCast(TransferBRep_BinderOfShape,sb,obj);
|
||||
DeclareAndCast(TransferBRep_ShapeMapper,sm,obj);
|
||||
if (!hs.IsNull()) S = hs->Shape();
|
||||
if (!sb.IsNull()) S = sb->Result();
|
||||
if (!sm.IsNull()) S = sm->Value();
|
||||
Interface_CheckIterator nchl;
|
||||
|
||||
for (chl.Start(); chl.More(); chl.Next()) {
|
||||
const Handle(Interface_Check) ach = chl.Value();
|
||||
if (ach->NbFails() + ach->NbWarnings() == 0) continue;
|
||||
Handle(Standard_Transient) ent = ach->Entity();
|
||||
if (ent.IsNull()) continue;
|
||||
if (S.IsNull()) {
|
||||
if (ent == obj) {
|
||||
Handle(Interface_Check) bch(ach); bch->SetEntity(ent);
|
||||
nchl.Add (bch,0);
|
||||
}
|
||||
} else {
|
||||
TopoDS_Shape sh;
|
||||
DeclareAndCast(TopoDS_HShape,hsh,ent);
|
||||
DeclareAndCast(TransferBRep_BinderOfShape,sbs,ent);
|
||||
DeclareAndCast(TransferBRep_ShapeMapper,smp,ent);
|
||||
if (!hsh.IsNull()) sh = hsh->Shape();
|
||||
if (!sbs.IsNull()) sh = sbs->Result();
|
||||
if (!smp.IsNull()) sh = smp->Value();
|
||||
if (sh == S) {
|
||||
Handle(Interface_Check) bch(ach); bch->SetEntity(ent);
|
||||
nchl.Add (bch,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return nchl;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : PrintResultInfo
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TransferBRep::PrintResultInfo(const Handle(Message_Printer)& Printer,
|
||||
const Message_Msg& Header,
|
||||
const Handle(TransferBRep_TransferResultInfo)& ResultInfo,
|
||||
const Standard_Boolean printEmpty)
|
||||
{
|
||||
Standard_Integer R, RW, RF, RWF, NR, NRW, NRF, NRWF;
|
||||
R = ResultInfo->Result();
|
||||
RW = ResultInfo->ResultWarning();
|
||||
RF = ResultInfo->ResultFail();
|
||||
RWF = ResultInfo->ResultWarningFail();
|
||||
NR = ResultInfo->NoResult();
|
||||
NRW = ResultInfo->NoResultWarning();
|
||||
NRF = ResultInfo->NoResultFail();
|
||||
NRWF = ResultInfo->NoResultWarningFail();
|
||||
|
||||
Message_Msg aLocalHeader = Header;
|
||||
Printer->Send (aLocalHeader, Message_Info, Standard_True);
|
||||
|
||||
Message_Msg EPMSG30 ("Result.Print.MSG30"); // Result: %d
|
||||
EPMSG30.Arg (R);
|
||||
Printer->Send (EPMSG30, Message_Info, Standard_True);
|
||||
if(printEmpty || (RW > 0 )) {
|
||||
Message_Msg EPMSG32 ("Result.Print.MSG32"); // Result + Warning(s): %d
|
||||
EPMSG32.Arg (RW);
|
||||
Printer->Send (EPMSG32, Message_Info, Standard_True);
|
||||
}
|
||||
if(printEmpty || (RF > 0 )) {
|
||||
Message_Msg EPMSG34 ("Result.Print.MSG34"); // Result + Fail(s): %d
|
||||
EPMSG34.Arg (RF);
|
||||
Printer->Send (EPMSG34, Message_Info, Standard_True);
|
||||
}
|
||||
if(printEmpty || (RWF > 0)) {
|
||||
Message_Msg EPMSG36 ("Result.Print.MSG36"); // Result + Warning(s) + Fail(s): %d
|
||||
EPMSG36.Arg (RWF);
|
||||
Printer->Send (EPMSG36, Message_Info, Standard_True);
|
||||
}
|
||||
Message_Msg EPMSG38 ("Result.Print.MSG38"); // TOTAL Result: %d
|
||||
EPMSG38.Arg (R + RW + RF + RWF);
|
||||
Printer->Send (EPMSG38, Message_Info, Standard_True);
|
||||
if(printEmpty || (NR > 0)) {
|
||||
Message_Msg EPMSG40 ("Result.Print.MSG40"); // No Result: %d
|
||||
EPMSG40.Arg (NR);
|
||||
Printer->Send (EPMSG40, Message_Info, Standard_True);
|
||||
}
|
||||
if(printEmpty || (NRW > 0)) {
|
||||
Message_Msg EPMSG42 ("Result.Print.MSG42"); // No Result + Warning(s): %d
|
||||
EPMSG42.Arg (NRW);
|
||||
Printer->Send (EPMSG42, Message_Info, Standard_True);
|
||||
}
|
||||
if(printEmpty || (NRF > 0)) {
|
||||
Message_Msg EPMSG44 ("Result.Print.MSG44"); // No Result + Fail(s): %d
|
||||
EPMSG44.Arg (NRF);
|
||||
Printer->Send (EPMSG44, Message_Info, Standard_True);
|
||||
}
|
||||
if(printEmpty || (NRWF > 0)) {
|
||||
Message_Msg EPMSG46 ("Result.Print.MSG46"); // No Result + Warning(s) + Fail(s): %d
|
||||
EPMSG46.Arg (NRWF);
|
||||
Printer->Send (EPMSG46, Message_Info, Standard_True);
|
||||
}
|
||||
|
||||
Message_Msg EPMSG48 ("Result.Print.MSG48"); // TOTAL No Result: %d
|
||||
EPMSG48.Arg (NR + NRW + NRF + NRWF);
|
||||
Printer->Send (EPMSG48, Message_Info, Standard_True);
|
||||
|
||||
}
|
184
src/TransferBRep/TransferBRep_Reader.cdl
Executable file
184
src/TransferBRep/TransferBRep_Reader.cdl
Executable file
@@ -0,0 +1,184 @@
|
||||
-- File: TransferBRep_Reader.cdl
|
||||
-- Created: Mon Oct 3 10:22:40 1994
|
||||
-- Author: Christian CAILLET
|
||||
-- <cky@stylox>
|
||||
---Copyright: Matra Datavision 1994
|
||||
|
||||
|
||||
class Reader from TransferBRep
|
||||
|
||||
---Purpose : This class offers a simple, easy to call, way of transferring
|
||||
-- data from interface files to Shapes from CasCade
|
||||
-- It must be specialized according to each norm/protocol, by :
|
||||
-- - defining how to read a file (specific method with protocol)
|
||||
-- - definig transfer, by providing an Actor
|
||||
|
||||
uses CString, Transient, HSequenceOfTransient from TColStd,
|
||||
Shape from TopoDS, HSequenceOfShape from TopTools,
|
||||
InterfaceModel, Protocol from Interface, CheckIterator,
|
||||
TransientProcess from Transfer, ActorOfTransientProcess from Transfer
|
||||
|
||||
raises OutOfRange
|
||||
|
||||
is
|
||||
|
||||
Create returns Reader;
|
||||
---Purpose : Initializes a non-specialised Reader. Typically, for each norm
|
||||
-- or protocol, is will be required to define a specific Create
|
||||
-- to load a file and transfer it
|
||||
|
||||
SetProtocol (me : in out; protocol : Protocol from Interface);
|
||||
---Purpose : Records the protocol to be used for read and transfer roots
|
||||
|
||||
Protocol (me) returns Protocol from Interface is virtual;
|
||||
---Purpose : Returns the recorded Protocol
|
||||
|
||||
SetActor (me : in out; actor : ActorOfTransientProcess from Transfer);
|
||||
---Purpose : Records the actor to be used for transfers
|
||||
|
||||
Actor (me) returns ActorOfTransientProcess is virtual;
|
||||
---Purpose : Returns the recorded Actor
|
||||
|
||||
|
||||
SetFileStatus (me : in out; status : Integer);
|
||||
---Purpose : Sets File Status to be interpreted as follows :
|
||||
-- = 0 OK
|
||||
-- < 0 file not found
|
||||
-- > 0 read error, no Model could be created
|
||||
|
||||
FileStatus (me) returns Integer;
|
||||
---Purpose : Returns the File Status
|
||||
|
||||
FileNotFound (me) returns Boolean;
|
||||
---Purpose : Returns True if FileStatus is for FileNotFound
|
||||
|
||||
SyntaxError (me) returns Boolean;
|
||||
---Purpose : Returns True if FileStatus is for Error during read
|
||||
-- (major error; for local error, see CheckModel)
|
||||
|
||||
SetModel (me : in out; model : InterfaceModel);
|
||||
---Purpose : Specifies a Model to work on
|
||||
-- Also clears the result and Done status
|
||||
|
||||
Model (me) returns InterfaceModel;
|
||||
---Purpose : Returns the Model to be worked on
|
||||
|
||||
Clear (me : in out);
|
||||
---Purpose : clears the result and Done status. But not the Model.
|
||||
|
||||
CheckStatusModel (me; withprint : Boolean) returns Boolean;
|
||||
---Purpose : Checks the Model. Returns True if there is NO FAIL at all
|
||||
-- (regardless Warnings)
|
||||
-- If <withprint> is True, also sends Checks on standard output
|
||||
|
||||
CheckListModel (me) returns CheckIterator;
|
||||
---Purpose : Checks the Model (complete : syntax + semantic) and returns
|
||||
-- the produced Check List
|
||||
|
||||
ModeNewTransfer (me : in out) returns Boolean;
|
||||
---Purpose : Returns (by Reference, hence can be changed) the Mode for new
|
||||
-- Transfer : True (D) means that each new Transfer produces a
|
||||
-- new TransferProcess. Else keeps the original one but each
|
||||
-- Transfer clears its (former results are not kept)
|
||||
---C++ : return &
|
||||
|
||||
BeginTransfer (me : in out) returns Boolean;
|
||||
---Purpose : Initializes the Reader for a Transfer (one,roots, or list)
|
||||
-- Also calls PrepareTransfer
|
||||
-- Returns True when done, False if could not be done
|
||||
|
||||
EndTransfer (me : in out);
|
||||
---Purpose : Ebds a Transfer (one, roots or list) by recording its result
|
||||
|
||||
PrepareTransfer (me : in out) is virtual;
|
||||
---Purpose : Prepares the Transfer. Also can act on the Actor or change the
|
||||
-- TransientProcess if required.
|
||||
-- Should not set the Actor into the TransientProcess, it is done
|
||||
-- by caller. The provided default does nothing.
|
||||
|
||||
TransferRoots (me : in out) is virtual;
|
||||
---Purpose : Transfers all Root Entities which are recognized as Geom-Topol
|
||||
-- The result will be a list of Shapes.
|
||||
-- This method calls user redefinable PrepareTransfer
|
||||
-- Remark : former result is cleared
|
||||
|
||||
Transfer (me : in out; num : Integer) returns Boolean is virtual;
|
||||
---Purpose : Transfers an Entity given its rank in the Model (Root or not)
|
||||
-- Returns True if it is recognized as Geom-Topol.
|
||||
-- (But it can have failed : see IsDone)
|
||||
|
||||
TransferList (me : in out; list : HSequenceOfTransient) is virtual;
|
||||
---Purpose : Transfers a list of Entities (only the ones also in the Model)
|
||||
-- Remark : former result is cleared
|
||||
|
||||
IsDone (me) returns Boolean;
|
||||
---Purpose : Returns True if the LAST Transfer/TransferRoots was a success
|
||||
|
||||
NbShapes (me) returns Integer;
|
||||
---Purpose : Returns the count of produced Shapes (roots)
|
||||
|
||||
Shapes (me) returns HSequenceOfShape;
|
||||
---Purpose : Returns the complete list of produced Shapes
|
||||
|
||||
Shape (me; num : Integer = 1) returns Shape from TopoDS
|
||||
---Purpose : Returns a Shape given its rank, by default the first one
|
||||
raises OutOfRange;
|
||||
-- Error if num < 1 or num > NbShapes
|
||||
---C++ : return const &
|
||||
|
||||
ShapeResult (me; ent : Transient) returns Shape from TopoDS;
|
||||
---Purpose : Returns a Shape produced from a given entity (if it was
|
||||
-- individually transferred or if an intermediate result is
|
||||
-- known). If no Shape is bound with <ent>, returns a Null Shape
|
||||
-- Warning : Runs on the last call to Transfer,TransferRoots,TransferList
|
||||
|
||||
OneShape (me) returns Shape from TopoDS;
|
||||
---Purpose : Returns a unique Shape for the result :
|
||||
-- - a void Shape (type = SHAPE) if result is empty
|
||||
-- - a simple Shape if result has only one : returns this one
|
||||
-- - a Compound if result has more than one Shape
|
||||
|
||||
NbTransients (me) returns Integer;
|
||||
---Purpose : Returns the count of produced Transient Results (roots)
|
||||
|
||||
Transients (me) returns HSequenceOfTransient;
|
||||
---Purpose : Returns the complete list of produced Transient Results
|
||||
|
||||
Transient (me; num : Integer = 1) returns any Transient
|
||||
---Purpose : Returns a Transient Root Result, given its rank (by default
|
||||
-- the first one)
|
||||
raises OutOfRange;
|
||||
-- Error if num < 1 or num > NbShapes
|
||||
|
||||
|
||||
CheckStatusResult (me; withprints : Boolean) returns Boolean;
|
||||
---Purpose : Checks the Result of last Transfer (individual or roots, no
|
||||
-- cumulation on several transfers). Returns True if NO fail
|
||||
-- occured during Transfer (queries the TransientProcess)
|
||||
|
||||
CheckListResult (me) returns CheckIterator;
|
||||
---Purpose : Checks the Result of last Transfer (individual or roots, no
|
||||
-- cumulation on several transfers) and returns the produced list
|
||||
|
||||
TransientProcess (me) returns TransientProcess;
|
||||
---Purpose : Returns the TransientProcess. It records informations about
|
||||
-- the very last transfer done. Null if no transfer yet done.
|
||||
-- Can be used for queries more accurate than the default ones.
|
||||
|
||||
Destroy (me: in out) is virtual;
|
||||
---C++ : alias "Standard_EXPORT virtual ~TransferBRep_Reader() { Destroy(); }"
|
||||
|
||||
|
||||
fields
|
||||
|
||||
theProto : Protocol from Interface;
|
||||
theActor : ActorOfTransientProcess from Transfer;
|
||||
theModel : InterfaceModel;
|
||||
theFilest : Integer;
|
||||
theDone : Boolean is protected;
|
||||
theNewpr : Boolean;
|
||||
theProc : TransientProcess is protected;
|
||||
theShapes : HSequenceOfShape;
|
||||
theTransi : HSequenceOfTransient;
|
||||
|
||||
end Reader;
|
237
src/TransferBRep/TransferBRep_Reader.cxx
Executable file
237
src/TransferBRep/TransferBRep_Reader.cxx
Executable file
@@ -0,0 +1,237 @@
|
||||
#include <TransferBRep_Reader.ixx>
|
||||
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_CheckTool.hxx>
|
||||
#include <Transfer_TransferOutput.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
#include <TransferBRep.hxx>
|
||||
|
||||
#include <TopoDS_Compound.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
|
||||
TransferBRep_Reader::TransferBRep_Reader ()
|
||||
: theDone (Standard_False) , theFilest (0) , theNewpr (Standard_False)
|
||||
{ theShapes = new TopTools_HSequenceOfShape(); theTransi = new TColStd_HSequenceOfTransient(); }
|
||||
|
||||
void TransferBRep_Reader::SetProtocol
|
||||
(const Handle(Interface_Protocol)& protocol)
|
||||
{ theProto = protocol; }
|
||||
|
||||
Handle(Interface_Protocol) TransferBRep_Reader::Protocol () const
|
||||
{ return theProto; }
|
||||
|
||||
void TransferBRep_Reader::SetActor
|
||||
(const Handle(Transfer_ActorOfTransientProcess)& actor)
|
||||
{ theActor = actor; }
|
||||
|
||||
Handle(Transfer_ActorOfTransientProcess) TransferBRep_Reader::Actor () const
|
||||
{ return theActor; }
|
||||
|
||||
void TransferBRep_Reader::SetFileStatus (const Standard_Integer status)
|
||||
{ theFilest = status; }
|
||||
|
||||
Standard_Integer TransferBRep_Reader::FileStatus () const
|
||||
{ return theFilest; }
|
||||
|
||||
Standard_Boolean TransferBRep_Reader::FileNotFound () const
|
||||
{ return (theFilest < 0); }
|
||||
|
||||
Standard_Boolean TransferBRep_Reader::SyntaxError () const
|
||||
{ return (theFilest > 0); }
|
||||
|
||||
|
||||
void TransferBRep_Reader::SetModel
|
||||
(const Handle(Interface_InterfaceModel)& model)
|
||||
{
|
||||
theModel = model;
|
||||
Clear();
|
||||
}
|
||||
|
||||
Handle(Interface_InterfaceModel) TransferBRep_Reader::Model () const
|
||||
{ return theModel; }
|
||||
|
||||
|
||||
void TransferBRep_Reader::Clear ()
|
||||
{
|
||||
theDone = Standard_False;
|
||||
theShapes->Clear(); theTransi->Clear();
|
||||
}
|
||||
|
||||
Standard_Boolean TransferBRep_Reader::CheckStatusModel
|
||||
(const Standard_Boolean withprint) const
|
||||
{
|
||||
Interface_CheckTool cht (theModel,theProto);
|
||||
Interface_CheckIterator chl = cht.CompleteCheckList();
|
||||
if ( withprint && ! theProc.IsNull() )
|
||||
chl.Print (theProc->Messenger(), theModel, Standard_False);
|
||||
return chl.IsEmpty(Standard_True);
|
||||
}
|
||||
|
||||
Interface_CheckIterator TransferBRep_Reader::CheckListModel () const
|
||||
{
|
||||
Interface_CheckTool cht (theModel,theProto);
|
||||
Interface_CheckIterator chl = cht.CompleteCheckList();
|
||||
return chl;
|
||||
}
|
||||
|
||||
Standard_Boolean& TransferBRep_Reader::ModeNewTransfer ()
|
||||
{ return theNewpr; }
|
||||
|
||||
Standard_Boolean TransferBRep_Reader::BeginTransfer ()
|
||||
{
|
||||
theDone = Standard_False;
|
||||
if (theModel.IsNull()) return Standard_False;
|
||||
|
||||
if (theNewpr || theProc.IsNull())
|
||||
theProc = new Transfer_TransientProcess (theModel->NbEntities());
|
||||
else theProc->Clear();
|
||||
theProc->SetErrorHandle(Standard_True);
|
||||
theProc->SetModel (theModel);
|
||||
PrepareTransfer();
|
||||
theProc->SetActor (theActor);
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
void TransferBRep_Reader::EndTransfer ()
|
||||
{
|
||||
theShapes->Append ( TransferBRep::Shapes (theProc,Standard_True) );
|
||||
Standard_Integer i,nb = theProc->NbRoots();
|
||||
for (i = 1; i <= nb; i ++) {
|
||||
Handle(Standard_Transient) ent = theProc->Root(i);
|
||||
Handle(Standard_Transient) res = theProc->FindTransient(ent);
|
||||
if (!res.IsNull()) theTransi->Append (res);
|
||||
}
|
||||
theDone = Standard_True;
|
||||
}
|
||||
|
||||
|
||||
void TransferBRep_Reader::PrepareTransfer () { }
|
||||
|
||||
void TransferBRep_Reader::TransferRoots ()
|
||||
{
|
||||
Clear();
|
||||
if (!BeginTransfer()) return;
|
||||
Transfer_TransferOutput TP (theProc,theModel);
|
||||
|
||||
TP.TransferRoots(theProto);
|
||||
EndTransfer();
|
||||
}
|
||||
|
||||
Standard_Boolean TransferBRep_Reader::Transfer (const Standard_Integer num)
|
||||
{
|
||||
if (!BeginTransfer()) return Standard_False;
|
||||
if (num <= 0 || num > theModel->NbEntities()) return Standard_False;
|
||||
Handle(Standard_Transient) ent = theModel->Value(num);
|
||||
Transfer_TransferOutput TP (theProc,theModel);
|
||||
|
||||
if (theProc->TraceLevel() > 1) {
|
||||
Handle(Message_Messenger) sout = theProc->Messenger();
|
||||
sout<<"-- Transfer(Read) : ";
|
||||
theModel->Print (ent,sout);
|
||||
sout<<endl;
|
||||
}
|
||||
TP.Transfer(ent);
|
||||
theProc->SetRoot(ent);
|
||||
EndTransfer();
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
void TransferBRep_Reader::TransferList
|
||||
(const Handle(TColStd_HSequenceOfTransient)& list)
|
||||
{
|
||||
if (!BeginTransfer()) return;
|
||||
if (list.IsNull()) return;
|
||||
Transfer_TransferOutput TP (theProc,theModel);
|
||||
Standard_Integer i, nb = list->Length();
|
||||
Handle(Message_Messenger) sout = theProc->Messenger();
|
||||
|
||||
if (theProc->TraceLevel() > 1)
|
||||
sout<<"-- Transfer(Read-List) : "<<nb<<" Items"<<endl;
|
||||
for (i = 1; i <= nb; i ++) {
|
||||
Handle(Standard_Transient) ent = list->Value(i);
|
||||
if (theModel->Number(ent) == 0) continue;
|
||||
|
||||
if (theProc->TraceLevel() > 1)
|
||||
{
|
||||
sout<<"-- Transfer(Read-List), Item "<<i<<" : ";
|
||||
theModel->Print (ent,sout);
|
||||
sout<<endl;
|
||||
}
|
||||
TP.Transfer(ent);
|
||||
theProc->SetRoot(ent);
|
||||
}
|
||||
EndTransfer();
|
||||
}
|
||||
|
||||
Standard_Boolean TransferBRep_Reader::IsDone () const
|
||||
{ return theDone; }
|
||||
|
||||
// ###### RESULTAT : SHAPES ######
|
||||
|
||||
Standard_Integer TransferBRep_Reader::NbShapes () const
|
||||
{ return theShapes->Length(); }
|
||||
|
||||
Handle(TopTools_HSequenceOfShape) TransferBRep_Reader::Shapes () const
|
||||
{ return theShapes; }
|
||||
|
||||
const TopoDS_Shape& TransferBRep_Reader::Shape
|
||||
(const Standard_Integer num) const
|
||||
{ return theShapes->Value(num); }
|
||||
|
||||
TopoDS_Shape TransferBRep_Reader::OneShape () const
|
||||
{
|
||||
TopoDS_Shape res;
|
||||
Standard_Integer nb = theShapes->Length();
|
||||
if (nb == 0) return res;
|
||||
else if (nb == 1) return theShapes->Value(1);
|
||||
else {
|
||||
TopoDS_Compound C;
|
||||
BRep_Builder B;
|
||||
B.MakeCompound(C);
|
||||
for (Standard_Integer i = 1; i <= nb; i ++) B.Add (C,theShapes->Value(i));
|
||||
return C;
|
||||
}
|
||||
}
|
||||
|
||||
TopoDS_Shape TransferBRep_Reader::ShapeResult
|
||||
(const Handle(Standard_Transient)& ent) const
|
||||
{ return TransferBRep::ShapeResult (theProc,ent); }
|
||||
|
||||
// ###### RESULTAT : TRANSIENTS ######
|
||||
|
||||
Standard_Integer TransferBRep_Reader::NbTransients () const
|
||||
{ return theTransi->Length(); }
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) TransferBRep_Reader::Transients () const
|
||||
{ return theTransi; }
|
||||
|
||||
Handle(Standard_Transient) TransferBRep_Reader::Transient
|
||||
(const Standard_Integer num) const
|
||||
{ return theTransi->Value(num); }
|
||||
|
||||
|
||||
// ###### CHECKS ######
|
||||
|
||||
Standard_Boolean TransferBRep_Reader::CheckStatusResult
|
||||
(const Standard_Boolean withprint) const
|
||||
{
|
||||
Interface_CheckIterator chl;
|
||||
if (!theProc.IsNull()) chl = theProc->CheckList(Standard_False);
|
||||
if (withprint && ! theProc.IsNull())
|
||||
chl.Print (theProc->Messenger(), theModel, Standard_False);
|
||||
return chl.IsEmpty(Standard_True);
|
||||
}
|
||||
|
||||
Interface_CheckIterator TransferBRep_Reader::CheckListResult () const
|
||||
{
|
||||
if (!theProc.IsNull()) return theProc->CheckList(Standard_False);
|
||||
Interface_CheckIterator chbid; return chbid;
|
||||
}
|
||||
|
||||
Handle(Transfer_TransientProcess) TransferBRep_Reader::TransientProcess
|
||||
() const
|
||||
{ return theProc; }
|
||||
|
||||
void TransferBRep_Reader::Destroy() {}
|
||||
|
42
src/TransferBRep/TransferBRep_ShapeBinder.cdl
Executable file
42
src/TransferBRep/TransferBRep_ShapeBinder.cdl
Executable file
@@ -0,0 +1,42 @@
|
||||
-- File: TransferBRep_ShapeBinder.cdl
|
||||
-- Created: Mon Oct 3 10:38:43 1994
|
||||
-- Author: Assim
|
||||
-- <assim@stylox>
|
||||
---Copyright: Matra Datavision 1994
|
||||
|
||||
|
||||
class ShapeBinder from TransferBRep inherits BinderOfShape
|
||||
|
||||
---Purpose : A ShapeBinder is a BinderOfShape with some additional services
|
||||
-- to cast the Result under various kinds of Shapes
|
||||
|
||||
uses ShapeEnum from TopAbs, Shape from TopoDS ,
|
||||
Vertex from TopoDS, Edge from TopoDS, Wire from TopoDS,
|
||||
Face from TopoDS, Shell from TopoDS, Solid from TopoDS,
|
||||
CompSolid from TopoDS, Compound from TopoDS
|
||||
|
||||
raises TypeMismatch from Standard
|
||||
|
||||
is
|
||||
|
||||
Create returns mutable ShapeBinder;
|
||||
---Purpose : Creates an empty ShapeBinder
|
||||
|
||||
Create (res : Shape) returns mutable ShapeBinder;
|
||||
---Purpose : Creates a ShapeBinder with a result
|
||||
|
||||
ShapeType (me) returns ShapeEnum;
|
||||
---Purpose : Returns the Type of the Shape Result (under TopAbs form)
|
||||
|
||||
-- different sub-types for the Result. Result returns a Shape
|
||||
|
||||
Vertex (me) returns Vertex raises TypeMismatch from Standard;
|
||||
Edge (me) returns Edge raises TypeMismatch from Standard;
|
||||
Wire (me) returns Wire raises TypeMismatch from Standard;
|
||||
Face (me) returns Face raises TypeMismatch from Standard;
|
||||
Shell (me) returns Shell raises TypeMismatch from Standard;
|
||||
Solid (me) returns Solid raises TypeMismatch from Standard;
|
||||
CompSolid (me) returns CompSolid raises TypeMismatch from Standard;
|
||||
Compound (me) returns Compound raises TypeMismatch from Standard;
|
||||
|
||||
end ShapeBinder;
|
38
src/TransferBRep/TransferBRep_ShapeBinder.cxx
Executable file
38
src/TransferBRep/TransferBRep_ShapeBinder.cxx
Executable file
@@ -0,0 +1,38 @@
|
||||
#include <TransferBRep_ShapeBinder.ixx>
|
||||
#include <TopoDS.hxx>
|
||||
|
||||
|
||||
TransferBRep_ShapeBinder::TransferBRep_ShapeBinder () { }
|
||||
|
||||
TransferBRep_ShapeBinder::TransferBRep_ShapeBinder (const TopoDS_Shape& shape)
|
||||
: TransferBRep_BinderOfShape (shape) { }
|
||||
|
||||
TopAbs_ShapeEnum TransferBRep_ShapeBinder::ShapeType () const
|
||||
{
|
||||
if (!HasResult()) return TopAbs_SHAPE;
|
||||
return Result().ShapeType();
|
||||
}
|
||||
|
||||
TopoDS_Vertex TransferBRep_ShapeBinder::Vertex() const
|
||||
{ return TopoDS::Vertex(Result()); }
|
||||
|
||||
TopoDS_Edge TransferBRep_ShapeBinder::Edge() const
|
||||
{ return TopoDS::Edge(Result()); }
|
||||
|
||||
TopoDS_Wire TransferBRep_ShapeBinder::Wire() const
|
||||
{ return TopoDS::Wire(Result()); }
|
||||
|
||||
TopoDS_Face TransferBRep_ShapeBinder::Face() const
|
||||
{ return TopoDS::Face(Result()); }
|
||||
|
||||
TopoDS_Shell TransferBRep_ShapeBinder::Shell() const
|
||||
{ return TopoDS::Shell(Result()); }
|
||||
|
||||
TopoDS_Solid TransferBRep_ShapeBinder::Solid() const
|
||||
{ return TopoDS::Solid(Result()); }
|
||||
|
||||
TopoDS_CompSolid TransferBRep_ShapeBinder::CompSolid() const
|
||||
{ return TopoDS::CompSolid(Result()); }
|
||||
|
||||
TopoDS_Compound TransferBRep_ShapeBinder::Compound() const
|
||||
{ return TopoDS::Compound(Result()); }
|
25
src/TransferBRep/TransferBRep_ShapeInfo.cdl
Executable file
25
src/TransferBRep/TransferBRep_ShapeInfo.cdl
Executable file
@@ -0,0 +1,25 @@
|
||||
-- File: TransferBRep_ShapeInfo.cdl
|
||||
-- Created: Wed Sep 4 10:59:16 1996
|
||||
-- Author: Christian CAILLET
|
||||
-- <cky@fidox.paris1.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1996
|
||||
|
||||
|
||||
class ShapeInfo from TransferBRep
|
||||
|
||||
---Purpose : Gives informations on an object, see template DataInfo
|
||||
-- This class is for Shape
|
||||
|
||||
uses Type, Shape
|
||||
|
||||
is
|
||||
|
||||
Type (myclass; ent : Shape) returns Type;
|
||||
---Purpose : Returns the Type attached to an object
|
||||
-- Here, TShape (Shape has no Dynamic Type)
|
||||
|
||||
TypeName (myclass; ent : Shape) returns CString;
|
||||
---Purpose : Returns Type Name (string)
|
||||
-- Here, the true name of the Type of a Shape
|
||||
|
||||
end ShapeInfo;
|
25
src/TransferBRep/TransferBRep_ShapeInfo.cxx
Executable file
25
src/TransferBRep/TransferBRep_ShapeInfo.cxx
Executable file
@@ -0,0 +1,25 @@
|
||||
#include <TransferBRep_ShapeInfo.ixx>
|
||||
#include <TopoDS_TShape.hxx>
|
||||
|
||||
|
||||
Handle(Standard_Type) TransferBRep_ShapeInfo::Type
|
||||
(const TopoDS_Shape& ent)
|
||||
{ return STANDARD_TYPE(TopoDS_TShape); }
|
||||
|
||||
Standard_CString TransferBRep_ShapeInfo::TypeName
|
||||
(const TopoDS_Shape& ent)
|
||||
{
|
||||
if (ent.IsNull()) return "TopoDS_Shape";
|
||||
switch (ent.ShapeType()) {
|
||||
case TopAbs_VERTEX : return "TopoDS_Vertex";
|
||||
case TopAbs_EDGE : return "TopoDS_Edge";
|
||||
case TopAbs_WIRE : return "TopoDS_Wire";
|
||||
case TopAbs_FACE : return "TopoDS_Face";
|
||||
case TopAbs_SHELL : return "TopoDS_Shell";
|
||||
case TopAbs_SOLID : return "TopoDS_Solid";
|
||||
case TopAbs_COMPSOLID : return "TopoDS_CompSolid";
|
||||
case TopAbs_COMPOUND : return "TopoDS_Compound";
|
||||
default : break;
|
||||
}
|
||||
return "TopoDS_Shape";
|
||||
}
|
71
src/TransferBRep/TransferBRep_ShapeListBinder.cdl
Executable file
71
src/TransferBRep/TransferBRep_ShapeListBinder.cdl
Executable file
@@ -0,0 +1,71 @@
|
||||
-- File: TransferBRep_ShapeListBinder.cdl
|
||||
-- Created: Mon Oct 3 10:50:11 1994
|
||||
-- Author: Christian CAILLET
|
||||
-- <cky@stylox>
|
||||
---Copyright: Matra Datavision 1994
|
||||
|
||||
|
||||
class ShapeListBinder from TransferBRep inherits Binder from Transfer
|
||||
|
||||
---Purpose : This binder binds several (a list of) shapes with a starting
|
||||
-- entity, when this entity itself corresponds to a simple list
|
||||
-- of shapes. Each part is not seen as a sub-result of an
|
||||
-- independant componant, but as an item of a built-in list
|
||||
|
||||
uses CString, Type,
|
||||
ShapeEnum from TopAbs, Shape from TopoDS ,
|
||||
Vertex from TopoDS, Edge from TopoDS, Wire from TopoDS,
|
||||
Face from TopoDS, Shell from TopoDS, Solid from TopoDS,
|
||||
CompSolid from TopoDS, Compound from TopoDS ,
|
||||
HSequenceOfShape from TopTools
|
||||
|
||||
raises TypeMismatch, OutOfRange
|
||||
|
||||
is
|
||||
|
||||
Create returns mutable ShapeListBinder;
|
||||
|
||||
Create (list : mutable HSequenceOfShape from TopTools)
|
||||
returns mutable ShapeListBinder;
|
||||
|
||||
IsMultiple (me) returns Boolean is redefined;
|
||||
-- returns True if more than one result
|
||||
|
||||
ResultType (me) returns Type;
|
||||
-- returns TopoDS_Shape
|
||||
|
||||
ResultTypeName (me) returns CString;
|
||||
-- returns list(TopoDS_Shape)
|
||||
|
||||
AddResult (me : mutable; res : Shape);
|
||||
---Purpose : Adds an item to the result list
|
||||
|
||||
Result (me) returns HSequenceOfShape from TopTools;
|
||||
|
||||
SetResult (me : mutable; num : Integer; res : Shape);
|
||||
---Purpose : Changes an already defined sub-result
|
||||
|
||||
NbShapes (me) returns Integer;
|
||||
|
||||
Shape (me; num : Integer) returns Shape
|
||||
raises OutOfRange;
|
||||
---C++ : return const &
|
||||
|
||||
ShapeType (me; num : Integer) returns ShapeEnum;
|
||||
|
||||
-- different sub-types for the Result. Shape(num) returns a Shape
|
||||
|
||||
Vertex (me; num : Integer) returns Vertex raises TypeMismatch, OutOfRange;
|
||||
Edge (me; num : Integer) returns Edge raises TypeMismatch, OutOfRange;
|
||||
Wire (me; num : Integer) returns Wire raises TypeMismatch, OutOfRange;
|
||||
Face (me; num : Integer) returns Face raises TypeMismatch, OutOfRange;
|
||||
Shell (me; num : Integer) returns Shell raises TypeMismatch, OutOfRange;
|
||||
Solid (me; num : Integer) returns Solid raises TypeMismatch, OutOfRange;
|
||||
CompSolid (me; num : Integer) returns CompSolid raises TypeMismatch, OutOfRange;
|
||||
Compound (me; num : Integer) returns Compound raises TypeMismatch, OutOfRange;
|
||||
|
||||
fields
|
||||
|
||||
theres : HSequenceOfShape from TopTools;
|
||||
|
||||
end ShapeListBinder;
|
75
src/TransferBRep/TransferBRep_ShapeListBinder.cxx
Executable file
75
src/TransferBRep/TransferBRep_ShapeListBinder.cxx
Executable file
@@ -0,0 +1,75 @@
|
||||
#include <TransferBRep_ShapeListBinder.ixx>
|
||||
#include <TopoDS.hxx>
|
||||
|
||||
TransferBRep_ShapeListBinder::TransferBRep_ShapeListBinder ()
|
||||
{ theres = new TopTools_HSequenceOfShape(); }
|
||||
|
||||
TransferBRep_ShapeListBinder::TransferBRep_ShapeListBinder
|
||||
(const Handle(TopTools_HSequenceOfShape)& list)
|
||||
{ theres = list; }
|
||||
|
||||
Standard_Boolean TransferBRep_ShapeListBinder::IsMultiple () const
|
||||
{ return (NbShapes() > 1); }
|
||||
|
||||
Handle(Standard_Type) TransferBRep_ShapeListBinder::ResultType () const
|
||||
{ return STANDARD_TYPE(TransferBRep_ShapeListBinder); }
|
||||
|
||||
Standard_CString TransferBRep_ShapeListBinder::ResultTypeName () const
|
||||
{ return "list(TopoDS_Shape)"; }
|
||||
|
||||
|
||||
void TransferBRep_ShapeListBinder::AddResult (const TopoDS_Shape& shape)
|
||||
{ theres->Append(shape); }
|
||||
|
||||
Handle(TopTools_HSequenceOfShape) TransferBRep_ShapeListBinder::Result
|
||||
() const
|
||||
{ return theres; }
|
||||
|
||||
void TransferBRep_ShapeListBinder::SetResult
|
||||
(const Standard_Integer num, const TopoDS_Shape& shape)
|
||||
{ theres->SetValue(num,shape); }
|
||||
|
||||
Standard_Integer TransferBRep_ShapeListBinder::NbShapes () const
|
||||
{ return theres->Length(); }
|
||||
|
||||
const TopoDS_Shape& TransferBRep_ShapeListBinder::Shape
|
||||
(const Standard_Integer num) const
|
||||
{ return theres->Value(num); }
|
||||
|
||||
TopAbs_ShapeEnum TransferBRep_ShapeListBinder::ShapeType
|
||||
(const Standard_Integer num) const
|
||||
{ return theres->Value(num).ShapeType(); }
|
||||
|
||||
TopoDS_Vertex TransferBRep_ShapeListBinder::Vertex
|
||||
(const Standard_Integer num) const
|
||||
{ return TopoDS::Vertex(theres->Value(num)); }
|
||||
|
||||
TopoDS_Edge TransferBRep_ShapeListBinder::Edge
|
||||
(const Standard_Integer num) const
|
||||
{ return TopoDS::Edge(theres->Value(num)); }
|
||||
|
||||
TopoDS_Wire TransferBRep_ShapeListBinder::Wire
|
||||
(const Standard_Integer num) const
|
||||
{ return TopoDS::Wire(theres->Value(num)); }
|
||||
|
||||
TopoDS_Face TransferBRep_ShapeListBinder::Face
|
||||
(const Standard_Integer num) const
|
||||
{ return TopoDS::Face(theres->Value(num)); }
|
||||
|
||||
TopoDS_Shell TransferBRep_ShapeListBinder::Shell
|
||||
(const Standard_Integer num) const
|
||||
{ return TopoDS::Shell(theres->Value(num)); }
|
||||
|
||||
TopoDS_Solid TransferBRep_ShapeListBinder::Solid
|
||||
(const Standard_Integer num) const
|
||||
{ return TopoDS::Solid(theres->Value(num)); }
|
||||
|
||||
TopoDS_CompSolid TransferBRep_ShapeListBinder::CompSolid
|
||||
(const Standard_Integer num) const
|
||||
{ return TopoDS::CompSolid(theres->Value(num)); }
|
||||
|
||||
TopoDS_Compound TransferBRep_ShapeListBinder::Compound
|
||||
(const Standard_Integer num) const
|
||||
{ return TopoDS::Compound(theres->Value(num)); }
|
||||
|
||||
|
66
src/TransferBRep/TransferBRep_TransferResultInfo.cdl
Executable file
66
src/TransferBRep/TransferBRep_TransferResultInfo.cdl
Executable file
@@ -0,0 +1,66 @@
|
||||
-- File: TransferBRep_TransferResultInfo.cdl
|
||||
-- Created: Wed Aug 11 09:53:43 1999
|
||||
-- Author: Roman LYGIN
|
||||
-- <rln@kinox>
|
||||
---Copyright: Matra Datavision 1999
|
||||
|
||||
|
||||
class TransferResultInfo from TransferBRep inherits TShared from MMgt
|
||||
|
||||
---Purpose: Data structure for storing information on transfer result.
|
||||
-- At the moment it dispatches information for the following types:
|
||||
-- - result,
|
||||
-- - result + warning(s),
|
||||
-- - result + fail(s),
|
||||
-- - result + warning(s) + fail(s)
|
||||
-- - no result,
|
||||
-- - no result + warning(s),
|
||||
-- - no result + fail(s),
|
||||
-- - no result + warning(s) + fail(s),
|
||||
|
||||
is
|
||||
|
||||
Create returns TransferResultInfo from TransferBRep;
|
||||
---Purpose: Creates object with all fields nullified.
|
||||
|
||||
Clear (me: mutable);
|
||||
---Purpose: Resets all the fields.
|
||||
|
||||
Result (me: mutable) returns Integer;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
|
||||
ResultWarning (me: mutable) returns Integer;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
|
||||
ResultFail (me: mutable) returns Integer;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
|
||||
ResultWarningFail (me: mutable) returns Integer;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
|
||||
NoResult (me: mutable) returns Integer;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
|
||||
NoResultWarning (me: mutable) returns Integer;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
|
||||
NoResultFail (me: mutable) returns Integer;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
|
||||
NoResultWarningFail (me: mutable) returns Integer;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
|
||||
fields
|
||||
|
||||
myR, myRW, myRF, myRWF,
|
||||
myNR, myNRW, myNRF, myNRWF: Integer;
|
||||
|
||||
end TransferResultInfo;
|
28
src/TransferBRep/TransferBRep_TransferResultInfo.cxx
Executable file
28
src/TransferBRep/TransferBRep_TransferResultInfo.cxx
Executable file
@@ -0,0 +1,28 @@
|
||||
// File: TransferBRep_TransferResultInfo.cxx
|
||||
// Created: Wed Aug 11 10:03:01 1999
|
||||
// Author: Roman LYGIN
|
||||
// <rln@kinox>
|
||||
|
||||
|
||||
#include <TransferBRep_TransferResultInfo.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : TransferBRep_TransferResultInfo
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
TransferBRep_TransferResultInfo::TransferBRep_TransferResultInfo()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Clear
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TransferBRep_TransferResultInfo::Clear ()
|
||||
{
|
||||
myNR = myNRW = myNRF = myNRWF =
|
||||
myR = myRW = myRF = myRWF = 0;
|
||||
}
|
85
src/TransferBRep/TransferBRep_TransferResultInfo.lxx
Executable file
85
src/TransferBRep/TransferBRep_TransferResultInfo.lxx
Executable file
@@ -0,0 +1,85 @@
|
||||
// File: TransferBRep_TransferResultInfo.lxx
|
||||
// Created: Wed Aug 11 10:04:59 1999
|
||||
// Author: Roman LYGIN
|
||||
// <rln@kinox>
|
||||
|
||||
//=======================================================================
|
||||
//function : Result
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer& TransferBRep_TransferResultInfo::Result()
|
||||
{
|
||||
return myR;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ResultWarning
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer& TransferBRep_TransferResultInfo::ResultWarning()
|
||||
{
|
||||
return myRW;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ResultFail
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer& TransferBRep_TransferResultInfo::ResultFail()
|
||||
{
|
||||
return myRF;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ResultWarningFail
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer& TransferBRep_TransferResultInfo::ResultWarningFail()
|
||||
{
|
||||
return myRWF;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NoResult
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer& TransferBRep_TransferResultInfo::NoResult()
|
||||
{
|
||||
return myNR;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NoResultWarning
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer& TransferBRep_TransferResultInfo::NoResultWarning()
|
||||
{
|
||||
return myNRW;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NoResultFail
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer& TransferBRep_TransferResultInfo::NoResultFail()
|
||||
{
|
||||
return myNRF;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NoResultWarningFail
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer& TransferBRep_TransferResultInfo::NoResultWarningFail()
|
||||
{
|
||||
return myNRWF;
|
||||
}
|
||||
|
Reference in New Issue
Block a user