Version: 9.16.0
GEOMImpl_IHealing.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23#include "GEOM_Function.hxx"
24
25#include <TColStd_HArray1OfInteger.hxx>
26#include <TColStd_HArray1OfExtendedString.hxx>
27#include <TColStd_HSequenceOfTransient.hxx>
28#include <TopAbs.hxx>
30
32{
33public:
34
35 enum {
48 };
49
50 GEOMImpl_IHealing(Handle(GEOM_Function) theFunction): _func(theFunction) {}
51
52 void SetOperators( const Handle(TColStd_HArray1OfExtendedString)& arr ) { if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_OPERATORS, arr); }
53 Handle(TColStd_HArray1OfExtendedString) GetOperators() { return _func->GetStringArray(ARG_SHAPE_PROCESS_OPERATORS); }
54
55 void SetParameters( const Handle(TColStd_HArray1OfExtendedString)& arr ) { if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_PARAMS, arr); }
56 Handle(TColStd_HArray1OfExtendedString) GetParameters() { return _func->GetStringArray(ARG_SHAPE_PROCESS_PARAMS); }
57
58 void SetValues( const Handle(TColStd_HArray1OfExtendedString)& arr ) { if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_VALUES, arr); }
59 Handle(TColStd_HArray1OfExtendedString) GetValues() { return _func->GetStringArray(ARG_SHAPE_PROCESS_VALUES); }
60
61 void SetOriginal( Handle(GEOM_Function) f ) { _func->SetReference(ARG_ORIGINAL, f); }
62 Handle(GEOM_Function) GetOriginal() { return _func->GetReference(ARG_ORIGINAL); }
63
64 void SetFaces( const Handle(TColStd_HArray1OfInteger)& arr ) { if ( !arr.IsNull() ) _func->SetIntegerArray(ARG_LIST_ARGUMENTS, arr); }
65 Handle(TColStd_HArray1OfInteger) GetFaces() { return _func->GetIntegerArray(ARG_LIST_ARGUMENTS); }
66
67 void SetWires( const Handle(TColStd_HArray1OfInteger)& arr ) { if ( !arr.IsNull() ) _func->SetIntegerArray(ARG_LIST_ARGUMENTS, arr); }
68 Handle(TColStd_HArray1OfInteger) GetWires() { return _func->GetIntegerArray(ARG_LIST_ARGUMENTS); }
69
70 void SetIsCommonVertex( Standard_Boolean val ) { _func->SetInteger(ARG_IS_COMMON_VERTEX, val ? 1 : 0 ); }
71 Standard_Boolean GetIsCommonVertex() { return (_func->GetInteger(ARG_IS_COMMON_VERTEX) != 0 ); }
72
73 void SetIsByParameter( Standard_Boolean val ) { _func->SetInteger(ARG_IS_BY_PARAMETER, val ? 1 : 0 ); }
74 Standard_Boolean GetIsByParameter() { return (_func->GetInteger(ARG_IS_BY_PARAMETER) != 0 ); }
75
76 void SetTolerance( Standard_Real val ) { _func->SetReal(ARG_TOLERANCE, val); }
77 Standard_Real GetTolerance() { return _func->GetReal(ARG_TOLERANCE); }
78
79 void SetExactAdjust( Standard_Boolean val ) { _func->SetInteger(ARG_EXACT_ADJUST, val ? 1 : 0); }
80 Standard_Boolean GetExactAdjust() { return (_func->GetInteger(ARG_EXACT_ADJUST) != 0 ); }
81
82 void SetDevideEdgeValue( Standard_Real val ) { _func->SetReal(ARG_DEV_EDGE_VALUE, val); }
83 Standard_Real GetDevideEdgeValue() { return _func->GetReal(ARG_DEV_EDGE_VALUE); }
84
85 void SetIndex( Standard_Integer val ) { _func->SetInteger(ARG_SUBSHAPE_INDEX, val); }
86 Standard_Integer GetIndex() { return _func->GetInteger(ARG_SUBSHAPE_INDEX); }
87
88 void SetShapes(const Handle(TColStd_HSequenceOfTransient)& theShapes)
89 { _func->SetReferenceList(ARG_LIST_SHAPES, theShapes); }
90 Handle(TColStd_HSequenceOfTransient) GetShapes()
91 { return _func->GetReferenceList(ARG_LIST_SHAPES); }
92
93 Handle(TColStd_HSequenceOfTransient) GetOriginalAndShapes()
94 {
95 Handle(TColStd_HSequenceOfTransient) funs = GetShapes();
96 if ( funs.IsNull() ) funs = new TColStd_HSequenceOfTransient;
97 funs->Prepend( GetOriginal() );
98 return funs;
99 }
100
102 {
103 if ( ms ) ms->Clear();
104 _func->SetCallBackData( (void*) ms );
105 }
107 {
108 return (ShHealOper_ModifStats*) _func->GetCallBackData();
109 }
110
111private:
112 Handle(GEOM_Function) _func;
113};
Definition: GEOMImpl_IHealing.hxx:32
GEOMImpl_IHealing(Handle(GEOM_Function) theFunction)
Definition: GEOMImpl_IHealing.hxx:50
void SetParameters(const Handle(TColStd_HArray1OfExtendedString)&arr)
Definition: GEOMImpl_IHealing.hxx:55
void SetFaces(const Handle(TColStd_HArray1OfInteger)&arr)
Definition: GEOMImpl_IHealing.hxx:64
Standard_Real GetTolerance()
Definition: GEOMImpl_IHealing.hxx:77
Standard_Boolean GetExactAdjust()
Definition: GEOMImpl_IHealing.hxx:80
void SetShapes(const Handle(TColStd_HSequenceOfTransient)&theShapes)
Definition: GEOMImpl_IHealing.hxx:88
Handle(TColStd_HSequenceOfTransient) GetOriginalAndShapes()
Definition: GEOMImpl_IHealing.hxx:93
void SetWires(const Handle(TColStd_HArray1OfInteger)&arr)
Definition: GEOMImpl_IHealing.hxx:67
ShHealOper_ModifStats * GetStatistics()
Definition: GEOMImpl_IHealing.hxx:106
void SetTolerance(Standard_Real val)
Definition: GEOMImpl_IHealing.hxx:76
Handle(TColStd_HArray1OfInteger) GetFaces()
Definition: GEOMImpl_IHealing.hxx:65
@ ARG_DEV_EDGE_VALUE
Definition: GEOMImpl_IHealing.hxx:43
@ ARG_IS_COMMON_VERTEX
Definition: GEOMImpl_IHealing.hxx:41
@ ARG_SUBSHAPE_INDEX
Definition: GEOMImpl_IHealing.hxx:45
@ ARG_IS_BY_PARAMETER
Definition: GEOMImpl_IHealing.hxx:44
@ ARG_SHAPE_PROCESS_PARAMS
Definition: GEOMImpl_IHealing.hxx:37
@ ARG_EXACT_ADJUST
Definition: GEOMImpl_IHealing.hxx:47
@ ARG_LIST_SHAPES
Definition: GEOMImpl_IHealing.hxx:46
@ ARG_SHAPE_PROCESS_OPERATORS
Definition: GEOMImpl_IHealing.hxx:36
@ ARG_LIST_ARGUMENTS
Definition: GEOMImpl_IHealing.hxx:40
@ ARG_ORIGINAL
Definition: GEOMImpl_IHealing.hxx:39
@ ARG_SHAPE_PROCESS_VALUES
Definition: GEOMImpl_IHealing.hxx:38
@ ARG_TOLERANCE
Definition: GEOMImpl_IHealing.hxx:42
Handle(TColStd_HSequenceOfTransient) GetShapes()
Definition: GEOMImpl_IHealing.hxx:90
void SetDevideEdgeValue(Standard_Real val)
Definition: GEOMImpl_IHealing.hxx:82
Standard_Integer GetIndex()
Definition: GEOMImpl_IHealing.hxx:86
void SetExactAdjust(Standard_Boolean val)
Definition: GEOMImpl_IHealing.hxx:79
Standard_Real GetDevideEdgeValue()
Definition: GEOMImpl_IHealing.hxx:83
void SetOriginal(Handle(GEOM_Function) f)
Definition: GEOMImpl_IHealing.hxx:61
Handle(TColStd_HArray1OfExtendedString) GetParameters()
Definition: GEOMImpl_IHealing.hxx:56
Handle(TColStd_HArray1OfExtendedString) GetValues()
Definition: GEOMImpl_IHealing.hxx:59
Handle(TColStd_HArray1OfInteger) GetWires()
Definition: GEOMImpl_IHealing.hxx:68
Handle(TColStd_HArray1OfExtendedString) GetOperators()
Definition: GEOMImpl_IHealing.hxx:53
void SetIsByParameter(Standard_Boolean val)
Definition: GEOMImpl_IHealing.hxx:73
void SetValues(const Handle(TColStd_HArray1OfExtendedString)&arr)
Definition: GEOMImpl_IHealing.hxx:58
Handle(GEOM_Function) _func
void SetIndex(Standard_Integer val)
Definition: GEOMImpl_IHealing.hxx:85
void SetStatistics(ShHealOper_ModifStats *ms)
Definition: GEOMImpl_IHealing.hxx:101
Standard_Boolean GetIsCommonVertex()
Definition: GEOMImpl_IHealing.hxx:71
void SetOperators(const Handle(TColStd_HArray1OfExtendedString)&arr)
Definition: GEOMImpl_IHealing.hxx:52
void SetIsCommonVertex(Standard_Boolean val)
Definition: GEOMImpl_IHealing.hxx:70
Handle(GEOM_Function) GetOriginal()
Definition: GEOMImpl_IHealing.hxx:62
Standard_Boolean GetIsByParameter()
Definition: GEOMImpl_IHealing.hxx:74
Structure describing modifications done in a shape.
Definition: ShHealOper_ModifStats.hxx:36
void Clear()
Definition: ShHealOper_ModifStats.hxx:70