1 //NOTE: This is an intreface to a function for the Partition creation.
4 #include "GEOM_Function.hxx"
6 #include "TColStd_HSequenceOfTransient.hxx"
7 #include "TColStd_HArray1OfInteger.hxx"
9 #define PART_ARG_LIMIT 1
10 #define PART_ARG_SHAPES 2
11 #define PART_ARG_TOOLS 3
12 #define PART_ARG_KEEP_IN 4
13 #define PART_ARG_REM_IN 5
15 #define PART_ARG_MATERIALS 6
17 #define PART_ARG_SHAPE 7
18 #define PART_ARG_PLANE 8
20 class GEOMImpl_IPartition
24 GEOMImpl_IPartition(Handle(GEOM_Function) theFunction): _func(theFunction) {}
26 void SetLimit(int theLimit) { _func->SetInteger(PART_ARG_LIMIT, theLimit); }
28 void SetShapes(const Handle(TColStd_HSequenceOfTransient)& theShapes)
29 { _func->SetReferenceList(PART_ARG_SHAPES, theShapes); }
31 void SetTools(const Handle(TColStd_HSequenceOfTransient)& theShapes)
32 { _func->SetReferenceList(PART_ARG_TOOLS, theShapes); }
34 void SetKeepIns(const Handle(TColStd_HSequenceOfTransient)& theShapes)
35 { _func->SetReferenceList(PART_ARG_KEEP_IN, theShapes); }
37 void SetRemoveIns(const Handle(TColStd_HSequenceOfTransient)& theShapes)
38 { _func->SetReferenceList(PART_ARG_REM_IN, theShapes); }
40 void SetMaterials(const Handle(TColStd_HArray1OfInteger)& theMaterials)
41 { _func->SetIntegerArray(PART_ARG_MATERIALS, theMaterials); }
44 int GetLimit() { return _func->GetInteger(PART_ARG_LIMIT); }
46 Handle(TColStd_HSequenceOfTransient) GetShapes() { return _func->GetReferenceList(PART_ARG_SHAPES); }
47 Handle(TColStd_HSequenceOfTransient) GetTools() { return _func->GetReferenceList(PART_ARG_TOOLS); }
48 Handle(TColStd_HSequenceOfTransient) GetKeepIns() { return _func->GetReferenceList(PART_ARG_KEEP_IN); }
49 Handle(TColStd_HSequenceOfTransient) GetRemoveIns() { return _func->GetReferenceList(PART_ARG_REM_IN); }
51 Handle(TColStd_HArray1OfInteger) GetMaterials() { return _func->GetIntegerArray(PART_ARG_MATERIALS); }
54 void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(PART_ARG_SHAPE, theShape); }
55 void SetPlane(Handle(GEOM_Function) thePlane) { _func->SetReference(PART_ARG_PLANE, thePlane); }
57 Handle(GEOM_Function) GetShape() { return _func->GetReference(PART_ARG_SHAPE); }
58 Handle(GEOM_Function) GetPlane() { return _func->GetReference(PART_ARG_PLANE); }
62 Handle(GEOM_Function) _func;