(scad_file_path: PathStr, use_not_include: bool = True, dest_namespace_dict: Dict = None)
return True
Opens scad_file_path, parses it for all usable calls,
    and adds them to caller's namespace.
Opens scad_file_path, parses it for all usable calls,
    and adds them to caller's namespace.
Opens scad_file_path parses it for all usable calls and adds them to caller s namespace .
def use(scad_file_path: PathStr, use_not_include: bool = True, dest_namespace_dict: Dict = None):
    """
    Opens scad_file_path, parses it for all usable calls,
    and adds them to caller's namespace.
    """
    # These functions in solidpython are used here and only here; don't pollute
    # the global namespace with them
    from .solidpython import parse_scad_callables
    from .solidpython import new_openscad_class_str
    from .solidpython import calling_module

    scad_file_path = _find_library(scad_file_path) 

    symbols_dicts = parse_scad_callables(scad_file_path)

    for sd in symbols_dicts:
        class_str = new_openscad_class_str(sd['name'], sd['args'], sd['kwargs'],
                                           scad_file_path.as_posix(), use_not_include)
        # If this is called from 'include', we have to look deeper in the stack
        # to find the right module to add the new class to.
        if dest_namespace_dict is None:
            stack_depth = 2 if use_not_include else 3
            dest_namespace_dict = calling_module(stack_depth).__dict__
        try:
            exec(class_str, dest_namespace_dict)
        except Exception as e:
            classname = sd['name']
            msg = f"Unable to import SCAD module: `{classname}` from `{scad_file_path.name}`, with error: {e}"
            print(msg)

    return True
def use ( scad_file_path : PathStr , use_not_include : bool = True , dest_namespace_dict : Dict = None ) : # These functions in solidpython are used here and only here; don't pollute # the global namespace with them from . solidpython import parse_scad_callables from . solidpython import new_openscad_class_str from . solidpython import calling_module scad_file_path = _find_library ( scad_file_path ) symbols_dicts = parse_scad_callables ( scad_file_path ) for sd in symbols_dicts : class_str = new_openscad_class_str ( sd [ 'name' ] , sd [ 'args' ] , sd [ 'kwargs' ] , scad_file_path . as_posix ( ) , use_not_include ) # If this is called from 'include', we have to look deeper in the stack # to find the right module to add the new class to. if dest_namespace_dict is None : stack_depth = 2 if use_not_include else 3 dest_namespace_dict = calling_module ( stack_depth ) . __dict__ try : exec ( class_str , dest_namespace_dict ) except Exception as e : classname = sd [ 'name' ] msg = f"Unable to import SCAD module: `{classname}` from `{scad_file_path.name}`, with error: {e}" print ( msg ) return True