|
||||
File indexing completed on 2025-01-18 10:05:29
0001 // Created on: 1994-10-03 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1994-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _TransferBRep_HeaderFile 0018 #define _TransferBRep_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <TopTools_HSequenceOfShape.hxx> 0025 #include <Standard_Boolean.hxx> 0026 #include <TColStd_HSequenceOfTransient.hxx> 0027 #include <TopAbs_Orientation.hxx> 0028 #include <TransferBRep_HSequenceOfTransferResultInfo.hxx> 0029 #include <TColStd_HSequenceOfInteger.hxx> 0030 #include <Standard_Integer.hxx> 0031 class TopoDS_Shape; 0032 class Transfer_Binder; 0033 class Transfer_TransientProcess; 0034 class Standard_Transient; 0035 class Transfer_FinderProcess; 0036 class TransferBRep_ShapeMapper; 0037 class Message_Printer; 0038 class Message_Msg; 0039 class TransferBRep_TransferResultInfo; 0040 class Interface_CheckIterator; 0041 class Interface_InterfaceModel; 0042 0043 0044 //! This package gathers services to simply read files and convert 0045 //! them to Shapes from CasCade. IE. it can be used in conjunction 0046 //! with purely CasCade software 0047 class TransferBRep 0048 { 0049 public: 0050 0051 DEFINE_STANDARD_ALLOC 0052 0053 0054 //! Get the Shape recorded in a Binder 0055 //! If the Binder brings a multiple result, search for the Shape 0056 Standard_EXPORT static TopoDS_Shape ShapeResult (const Handle(Transfer_Binder)& binder); 0057 0058 //! Get the Shape recorded in a TransientProcess as result of the 0059 //! Transfer of an entity. I.E. in the binder bound to that Entity 0060 //! If no result or result not a single Shape, returns a Null Shape 0061 Standard_EXPORT static TopoDS_Shape ShapeResult (const Handle(Transfer_TransientProcess)& TP, const Handle(Standard_Transient)& ent); 0062 0063 //! Sets a Shape as a result for a starting entity <ent> 0064 //! (reverse of ShapeResult) 0065 //! It simply creates a ShapeBinder then binds it to the entity 0066 Standard_EXPORT static void SetShapeResult (const Handle(Transfer_TransientProcess)& TP, const Handle(Standard_Transient)& ent, const TopoDS_Shape& result); 0067 0068 //! Gets the Shapes recorded in a TransientProcess as result of a 0069 //! Transfer, considers roots only or all results according 0070 //! <rootsonly>, returns them as a HSequence 0071 Standard_EXPORT static Handle(TopTools_HSequenceOfShape) Shapes (const Handle(Transfer_TransientProcess)& TP, const Standard_Boolean rootsonly = Standard_True); 0072 0073 //! Gets the Shapes recorded in a TransientProcess as result of a 0074 //! Transfer, for a given list of starting entities, returns 0075 //! the shapes as a HSequence 0076 Standard_EXPORT static Handle(TopTools_HSequenceOfShape) Shapes (const Handle(Transfer_TransientProcess)& TP, const Handle(TColStd_HSequenceOfTransient)& list); 0077 0078 //! Returns a Status regarding a Shape in a FinderProcess 0079 //! - FORWARD means bound with SAME Orientation 0080 //! - REVERSED means bound with REVERSE Orientation 0081 //! - EXTERNAL means NOT BOUND 0082 //! - INTERNAL is not used 0083 Standard_EXPORT static TopAbs_Orientation ShapeState (const Handle(Transfer_FinderProcess)& FP, const TopoDS_Shape& shape); 0084 0085 //! Returns the result (as a Binder) attached to a given Shape 0086 //! Null if none 0087 Standard_EXPORT static Handle(Transfer_Binder) ResultFromShape (const Handle(Transfer_FinderProcess)& FP, const TopoDS_Shape& shape); 0088 0089 //! Returns the result as pure Transient attached to a Shape 0090 //! first one if multiple result 0091 Standard_EXPORT static Handle(Standard_Transient) TransientFromShape (const Handle(Transfer_FinderProcess)& FP, const TopoDS_Shape& shape); 0092 0093 //! Binds a Transient Result to a Shape in a FinderProcess 0094 //! (as first result if multiple : does not add it to existing one) 0095 Standard_EXPORT static void SetTransientFromShape (const Handle(Transfer_FinderProcess)& FP, const TopoDS_Shape& shape, const Handle(Standard_Transient)& result); 0096 0097 //! Returns a ShapeMapper for a given Shape (location included) 0098 //! Either <shape> is already mapped, then its Mapper is returned 0099 //! Or it is not, then a new one is created then returned, BUT 0100 //! it is not mapped here (use Bind or FindElseBind to do this) 0101 Standard_EXPORT static Handle(TransferBRep_ShapeMapper) ShapeMapper (const Handle(Transfer_FinderProcess)& FP, const TopoDS_Shape& shape); 0102 0103 //! Fills sequence of TransferResultInfo for each type of entity 0104 //! given in the EntityTypes (entity are given as objects). 0105 //! Method IsKind applied to the entities in TP is used to 0106 //! compare with entities in EntityTypes. 0107 //! TopAbs_ShapeEnum). 0108 Standard_EXPORT static void TransferResultInfo (const Handle(Transfer_TransientProcess)& TP, const Handle(TColStd_HSequenceOfTransient)& EntityTypes, Handle(TransferBRep_HSequenceOfTransferResultInfo)& InfoSeq); 0109 0110 //! Fills sequence of TransferResultInfo for each type of shape 0111 //! given in the ShapeTypes (which are in fact considered as 0112 //! TopAbs_ShapeEnum). 0113 //! The Finders in the FP are considered as ShapeMappers. 0114 Standard_EXPORT static void TransferResultInfo (const Handle(Transfer_FinderProcess)& FP, const Handle(TColStd_HSequenceOfInteger)& ShapeTypes, Handle(TransferBRep_HSequenceOfTransferResultInfo)& InfoSeq); 0115 0116 //! Prints the results of transfer to given priner with given header. 0117 Standard_EXPORT static void PrintResultInfo (const Handle(Message_Printer)& Printer, const Message_Msg& Header, const Handle(TransferBRep_TransferResultInfo)& ResultInfo, const Standard_Boolean printEmpty = Standard_True); 0118 0119 //! Performs a heavy check by calling the Analyser from BRepCheck 0120 //! This tool computes a lot of information about integrity of a 0121 //! Shape. This method uses it and converts its internal result 0122 //! to a classic check-list. 0123 //! <lev> allows to get more information : 0124 //! 0 : BRepCheck only 0125 //! 1(D) + Curves/Surfaces not C0 ; 2 + SameParameter on Edges 0126 //! Warning : entities to which checks are bound are the Shapes themselves, 0127 //! embedded in ShapeMapper 0128 Standard_EXPORT static Interface_CheckIterator BRepCheck (const TopoDS_Shape& shape, const Standard_Integer lev = 1); 0129 0130 //! Takes a starting CheckIterator which brings checks bound with 0131 //! starting objects (Shapes, Transient from an Imagine appli ...) 0132 //! and converts it to a CheckIterator in which checks are bound 0133 //! with results in an InterfaceModel 0134 //! Mapping is recorded in the FinderProcess 0135 //! Starting objects for which no individual result is recorded 0136 //! remain in their state 0137 Standard_EXPORT static Interface_CheckIterator ResultCheckList (const Interface_CheckIterator& chl, const Handle(Transfer_FinderProcess)& FP, const Handle(Interface_InterfaceModel)& model); 0138 0139 //! Returns the list of objects to which a non-empty Check is 0140 //! bound in a check-list. Objects are transients, they can then 0141 //! be either Imagine objects entities for an Interface Norm. 0142 //! <alsoshapes> commands Shapes to be returned too 0143 //! (as ShapeMapper), see also CheckedShapes 0144 Standard_EXPORT static Handle(TColStd_HSequenceOfTransient) Checked (const Interface_CheckIterator& chl, const Standard_Boolean alsoshapes = Standard_False); 0145 0146 //! Returns the list of shapes to which a non-empty Check is bound 0147 //! in a check-list 0148 Standard_EXPORT static Handle(TopTools_HSequenceOfShape) CheckedShapes (const Interface_CheckIterator& chl); 0149 0150 //! Returns the check-list bound to a given object, generally none 0151 //! (if OK) or one check. <obj> can be, either a true Transient 0152 //! object or entity, or a ShapeMapper, in that case the Shape is 0153 //! considered 0154 Standard_EXPORT static Interface_CheckIterator CheckObject (const Interface_CheckIterator& chl, const Handle(Standard_Transient)& obj); 0155 0156 }; 0157 0158 #endif // _TransferBRep_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |