summaryrefslogtreecommitdiff
path: root/src/BRepMesh/BRepMesh_DiscretFactory.cdl
blob: e1e1d60453fe11a07f71635d8a796170e0bedb2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
-- File:      BRepMesh_DiscretFactory.cdl
-- Created:   Thu Apr 10 12:34:15 2008
-- Author:    Peter KURNEV <pkv@irinox>
--
---Copyright: Matra Datavision 2008

class DiscretFactory from BRepMesh

    ---Purpose:
    -- This class intended to setup / retrieve default triangulation algorithm.
    -- Use BRepMesh_DiscretFactory::Get() static method to retrieve global Factory instance.
    -- Use BRepMesh_DiscretFactory::Discret() method to retrieve meshing tool.

uses
    DiscretRoot      from BRepMesh,
    FactoryError     from BRepMesh,
    PluginEntryType  from BRepMesh,
    AsciiString      from TCollection,
    MapOfAsciiString from TColStd,
    Shape            from TopoDS,
    MapOfFunctions   from Plugin

--raises

is
    Create
        returns DiscretFactory from BRepMesh
        is protected;
    ---C++: alias "Standard_EXPORT virtual ~BRepMesh_DiscretFactory();"

    Get (myclass)
        returns DiscretFactory from BRepMesh;
    ---C++: return &
    ---Purpose:
    -- Returns the global factory instance.

    Names (me)
        returns MapOfAsciiString from TColStd;
    ---C++: return const &
    ---Purpose:
    -- Returns the list of registered meshing algorithms.

    SetDefaultName (     me : out;
                    theName : AsciiString from TCollection)
        returns Boolean from Standard;
    ---Purpose:
    -- Setup meshing algorithm by name.
    -- Returns true if requested tool is available.
    -- On fail Factory will continue to use previous algo.

    DefaultName (me)
        returns AsciiString from TCollection;
    ---C++: return const &
    ---Purpose:
    -- Returns name for current meshing algorithm.

    SetFunctionName (         me : out;
                     theFuncName : AsciiString from TCollection)
        returns Boolean from Standard;
    ---Purpose:
    -- Advanced function. Changes function name to retrieve from plugin.
    -- Returns true if requested tool is available.
    -- On fail Factory will continue to use previous algo.

    SetDefault (         me : out;
                    theName : AsciiString from TCollection;
                theFuncName : AsciiString from TCollection = "DISCRETALGO")
        returns Boolean from Standard;
    ---Purpose:
    -- Setup meshing algorithm that should be created by this Factory.
    -- Returns true if requested tool is available.
    -- On fail Factory will continue to use previous algo.
    -- Call ::ErrorStatus() method to retrieve fault reason.

    FunctionName (me)
        returns AsciiString from TCollection;
    ---C++: return const &
    ---Purpose:
    -- Returns function name that should be exported by plugin.

    Discret (me            : out;
             theShape      : Shape from TopoDS;
             theDeflection : Real  from Standard;
             theAngle      : Real  from Standard)
        returns DiscretRoot from BRepMesh;
    ---Purpose:
    -- Returns triangulation algorithm instance.

    ErrorStatus (me)
        returns FactoryError from BRepMesh;
    ---Purpose:
    -- Returns error status for last meshing algorithm switch.

    Clear (me : out)
        is protected;

fields
    myPluginEntry    : PluginEntryType from BRepMesh is protected;
    myErrorStatus    : FactoryError from BRepMesh is protected;
    myNames          : MapOfAsciiString from TColStd is protected;
    myDefaultName    : AsciiString from TCollection is protected;
    myFunctionName   : AsciiString from TCollection is protected;
    myFactoryMethods : MapOfFunctions from Plugin is protected;

end DiscretFactory;