Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit e45a809

Browse files
committed
Updated variables defining module name and methods
1 parent df012cd commit e45a809

File tree

9 files changed

+28
-19
lines changed

9 files changed

+28
-19
lines changed

src/acis_geometric_atoms.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1558,13 +1558,14 @@ static PyTypeObject
15581558
*/
15591559

15601560
// Module documentation can be accessible via __doc__
1561+
const char *module_name = "GeometricAtoms";
15611562
const char *module_documentation = "Contains 3D ACIS Modeler geometric atoms, e.g. SPAposition, SPApar_pos, etc.";
15621563

15631564
static PyModuleDef
15641565
ACIS_GeometricAtoms_module =
15651566
{
15661567
PyModuleDef_HEAD_INIT,
1567-
"GeometricAtoms",
1568+
module_name,
15681569
module_documentation,
15691570
-1,
15701571
NULL, NULL, NULL, NULL, NULL

src/acis_geometric_operators.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,24 @@ ACIS_GeometricOperators_method_translate_transf(PyObject *self, PyObject *args,
3939
}
4040

4141
static PyMethodDef
42-
ACIS_GeometricOperators_methods[] =
42+
module_methods[] =
4343
{
4444
{ "translate_transf", (PyCFunction) ACIS_GeometricOperators_method_translate_transf, METH_VARARGS | METH_KEYWORDS, "Constructs a transformation corresponding to a translation by a given vector" },
4545
{ NULL, NULL, 0, NULL }
4646
};
4747

4848
// Module documentation can be accessible via __doc__
49+
const char *module_name = "GeometricOperators";
4950
const char *module_documentation = "Contains 3D ACIS Modeler geometric operators";
5051

5152
static struct PyModuleDef
5253
ACIS_GeometricOperators_module =
5354
{
5455
PyModuleDef_HEAD_INIT,
55-
"GeometricOperators", // name of the module
56+
module_name, // name of the module
5657
module_documentation, // module documentation, may be NULL
5758
-1, // size of per-interpreter state of the module, or -1 if the module keeps state in global variables.
58-
ACIS_GeometricOperators_methods
59+
module_methods
5960
};
6061

6162
PyMODINIT_FUNC

src/acis_geometry.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,13 +582,14 @@ static PyTypeObject
582582
*/
583583

584584
// Module documentation can be accessible via __doc__
585+
const char *module_name = "Geometry";
585586
const char *module_documentation = "Contains 3D ACIS Modeler geometry objects, such as SURFACE, CONE, TORUS, etc.";
586587

587588
static PyModuleDef
588589
ACIS_Geometry_module =
589590
{
590591
PyModuleDef_HEAD_INIT,
591-
"Geometry",
592+
module_name,
592593
module_documentation,
593594
-1,
594595
NULL, NULL, NULL, NULL, NULL

src/acis_lists.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,14 @@ static PyTypeObject
311311
*/
312312

313313
// Module documentation can be accessible via __doc__
314+
const char *module_name = "Lists";
314315
const char *module_documentation = "Contains 3D ACIS Modeler lists and containers, such as ENTITY_LIST";
315316

316317
static PyModuleDef
317318
ACIS_Lists_module =
318319
{
319320
PyModuleDef_HEAD_INIT,
320-
"Lists",
321+
module_name,
321322
module_documentation,
322323
-1,
323324
NULL, NULL, NULL, NULL, NULL

src/acis_modeler.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ ACIS_api_boolean_chop_body(PyObject *self, PyObject *args, PyObject *kwargs)
884884
}
885885

886886
static PyMethodDef
887-
ACIS_Modeler_methods[] =
887+
module_methods[] =
888888
{
889889
{ "api_start_modeller", (PyCFunction) ACIS_api_start_modeller, METH_VARARGS | METH_KEYWORDS, "Starts the 3D ACIS Modeler" },
890890
{ "api_stop_modeller", (PyCFunction) ACIS_api_stop_modeller, METH_NOARGS, "Stops the 3D ACIS Modeler" },
@@ -913,16 +913,17 @@ static PyMethodDef
913913
};
914914

915915
// Module documentation can be accessible via __doc__
916+
const char *module_name = "Modeler";
916917
const char *module_documentation = "3D ACIS Modeler main modeling component";
917918

918919
static struct PyModuleDef
919920
ACIS_Modeler_module =
920921
{
921922
PyModuleDef_HEAD_INIT,
922-
"Modeler", // name of the module
923+
module_name, // name of the module
923924
module_documentation, // module documentation, may be NULL
924925
-1, // size of per-interpreter state of the module, or -1 if the module keeps state in global variables.
925-
ACIS_Modeler_methods
926+
module_methods
926927
};
927928

928929
PyMODINIT_FUNC

src/acis_query.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ ACIS_api_get_edges(PyObject *self, PyObject *args, PyObject *kwargs)
146146
}
147147

148148
static PyMethodDef
149-
ACIS_Query_methods[] =
149+
module_methods[] =
150150
{
151151
{ "get_owner_transf", (PyCFunction) ACIS_Query_method_get_owner_transf, METH_VARARGS | METH_KEYWORDS, "Gets a copy of the SPAtransf from the owner of an ENTITY" },
152152
{ "api_get_faces", (PyCFunction) ACIS_api_get_faces, METH_VARARGS | METH_KEYWORDS, "Gets all faces related to an entity" },
@@ -155,16 +155,17 @@ static PyMethodDef
155155
};
156156

157157
// Module documentation can be accessible via __doc__
158+
const char *module_name = "Query";
158159
const char *module_documentation = "Contains 3D Modeler ACIS geometric and topological queries";
159160

160161
static struct PyModuleDef
161162
ACIS_Query_module =
162163
{
163164
PyModuleDef_HEAD_INIT,
164-
"Query", // name of the module
165+
module_name, // name of the module
165166
module_documentation, // module documentation, may be NULL
166167
-1, // size of per-interpreter state of the module, or -1 if the module keeps state in global variables.
167-
ACIS_Query_methods
168+
module_methods
168169
};
169170

170171
PyMODINIT_FUNC

src/acis_saverestore.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ ACIS_api_save_version(PyObject *self, PyObject *args, PyObject *kwargs)
460460

461461

462462
static PyMethodDef
463-
ACIS_SaveRestore_methods[] =
463+
module_methods[] =
464464
{
465465
{ "api_save_entity_list", (PyCFunction) ACIS_api_save_entity_list, METH_VARARGS | METH_KEYWORDS, "Writes entities to a file in text or binary format" },
466466
{ "api_set_file_info", (PyCFunction) ACIS_api_set_file_info, METH_VARARGS | METH_KEYWORDS, "Sets required header info to be written to ACIS save files" },
@@ -470,16 +470,17 @@ static PyMethodDef
470470
};
471471

472472
// Module documentation can be accessible via __doc__
473+
const char *module_name = "SaveRestore";
473474
const char *module_documentation = "Contains 3D ACIS Modeler save & restore related classes and functions";
474475

475476
static PyModuleDef
476477
ACIS_SaveRestore_module =
477478
{
478479
PyModuleDef_HEAD_INIT,
479-
"SaveRestore",
480+
module_name,
480481
module_documentation,
481482
-1,
482-
ACIS_SaveRestore_methods
483+
module_methods
483484
};
484485

485486
PyMODINIT_FUNC

src/acis_sweeping.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,24 +456,25 @@ ACIS_api_sweep_with_options(PyObject *self, PyObject *args, PyObject *kwargs)
456456
}
457457

458458
static PyMethodDef
459-
ACIS_Sweeping_methods[] =
459+
module_methods[] =
460460
{
461461
{ "api_make_sweep_path", (PyCFunction) ACIS_api_make_sweep_path, METH_VARARGS | METH_KEYWORDS, "Constructs a path useful for creating a swept surface" },
462462
{ "api_sweep_with_options", (PyCFunction) ACIS_api_sweep_with_options, METH_VARARGS | METH_KEYWORDS, "Sweeps the given profile along an edge, a distance, a vector or an axis" },
463463
{ NULL, NULL, 0, NULL }
464464
};
465465

466466
// Module documentation can be accessible via __doc__
467+
const char *module_name = "Sweeping";
467468
const char *module_documentation = "Contains 3D ACIS Modeler sweeping API related classes and functions";
468469

469470
static struct PyModuleDef
470471
ACIS_Sweeping_module =
471472
{
472473
PyModuleDef_HEAD_INIT,
473-
"Sweeping", // name of the module
474+
module_name, // name of the module
474475
module_documentation, // module documentation, may be NULL
475476
-1, // size of per-interpreter state of the module, or -1 if the module keeps state in global variables.
476-
ACIS_Sweeping_methods
477+
module_methods
477478
};
478479

479480
PyMODINIT_FUNC

src/acis_topology.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,13 +1196,14 @@ static PyTypeObject
11961196
*/
11971197

11981198
// Module documentation can be accessible via __doc__
1199+
const char *module_name = "Topology";
11991200
const char *module_documentation = "Contains 3D ACIS Modeler topology objects, such as BODY, FACE, WIRE, etc.";
12001201

12011202
static PyModuleDef
12021203
ACIS_Topology_module =
12031204
{
12041205
PyModuleDef_HEAD_INIT,
1205-
"Topology",
1206+
module_name,
12061207
module_documentation,
12071208
-1,
12081209
NULL, NULL, NULL, NULL, NULL

0 commit comments

Comments
 (0)