1- from ansys .dpf import core as dpf
2- from ansys .dpf .core .dpf_operator import available_operator_names
3- from ansys .dpf .core .core import load_library
41import argparse
5- from jinja2 import Template
62from pathlib import Path
73
4+ from jinja2 import Template
5+
6+ from ansys .dpf import core as dpf
7+ from ansys .dpf .core .core import load_library
8+ from ansys .dpf .core .dpf_operator import available_operator_names
9+
10+
811def initialize_server (ansys_path = None , include_composites = False , include_sound = False ):
912 server = dpf .start_local_server (ansys_path = ansys_path )
1013 print (f"Ansys Path: { server .ansys_path } " )
@@ -15,13 +18,15 @@ def initialize_server(ansys_path=None, include_composites=False, include_sound=F
1518 if include_composites :
1619 print ("Loading Composites Plugin" )
1720 load_library (
18- Path (server .ansys_path ) / "dpf" / "plugins" / "dpf_composites" / "composite_operators.dll"
21+ Path (server .ansys_path )
22+ / "dpf"
23+ / "plugins"
24+ / "dpf_composites"
25+ / "composite_operators.dll"
1926 )
2027 if include_sound :
2128 print ("Loading Acoustics Plugin" )
22- load_library (
23- Path (server .ansys_path ) / "Acoustics" / "SAS" / "ads" / "dpf_sound.dll"
24- )
29+ load_library (Path (server .ansys_path ) / "Acoustics" / "SAS" / "ads" / "dpf_sound.dll" )
2530 return server
2631
2732
@@ -74,7 +79,7 @@ def fetch_doc_info(server, operator_name):
7479 full_name = None
7580
7681 user_name = properties .pop ("user_name" , operator_name )
77-
82+
7883 op_friendly_name = user_name
7984 if category :
8085 op_friendly_name = category + ":" + op_friendly_name
@@ -133,7 +138,9 @@ def main():
133138 "--ansys_path" , default = None , help = "Path to Ansys DPF Server installation directory"
134139 )
135140 parser .add_argument ("--include_private" , action = "store_true" , help = "Include private operators" )
136- parser .add_argument ("--include_composites" , action = "store_true" , help = "Include composites operators" )
141+ parser .add_argument (
142+ "--include_composites" , action = "store_true" , help = "Include composites operators"
143+ )
137144 parser .add_argument ("--include_sound" , action = "store_true" , help = "Include sound operators" )
138145 args = parser .parse_args ()
139146 desired_plugin = args .plugin
0 commit comments