Module() : Py::ExtensionModule<Module>("WebGui") { add_varargs_method("openBrowser",&Module::openBrowser ); add_varargs_method("openBrowserHTML",&Module::openBrowserHTML ); initialize("This module is the WebGui module."); // register with Python }
UnitTestModule() : Py::ExtensionModule<UnitTestModule>("QtUnitGui") { TestGui::UnitTestDialogPy::init_type(); add_varargs_method("UnitTest",&UnitTestModule::new_UnitTest,"UnitTest"); add_varargs_method("setTest",&UnitTestModule::setTest,"setTest"); add_varargs_method("addTest",&UnitTestModule::addTest,"addTest"); initialize("This module is the QtUnitGui module"); // register with Python }
Module() : Py::ExtensionModule<Module>("Sketcher") { add_varargs_method("open",&Module::open ); add_varargs_method("insert",&Module::insert ); initialize("This module is the Sketcher module."); // register with Python }
Module() : Py::ExtensionModule<Module>("SandboxGui") { add_varargs_method("interactiveFilletArc",&Module::interactiveFilletArc, "Interactive fillet arc"); add_varargs_method("xmlReader",&Module::xmlReader, "Read XML"); initialize("This module is the SandboxGui module"); // register with Python }
_png_module() : Py::ExtensionModule<_png_module>( "_png" ) { add_varargs_method("write_png", &_png_module::write_png, "write_png(buffer, width, height, fileobj, dpi=None)"); add_varargs_method("read_png", &_png_module::read_png, "read_png(fileobj)"); initialize("Module to write PNG files"); }
Module() : Py::ExtensionModule<Module>("Points") { add_varargs_method("open",&Module::open ); add_varargs_method("insert",&Module::insert ); add_varargs_method("show",&Module::show ); initialize("This module is the Points module."); // register with Python }
void Point::init_type() { _VERBOSE("Point::init_type"); behaviors().name("Point"); behaviors().doc("A point x, y"); add_varargs_method("x", &Point::x, "x()\n"); add_varargs_method("y", &Point::y, "y()\n"); add_varargs_method("reference_count", &Point::reference_count); }
void LazyValue::init_type() { _VERBOSE("LazyValue::init_type"); behaviors().name("LazyValue"); behaviors().doc("A lazy evaluation float, with arithmetic"); behaviors().supportNumberType(); behaviors().supportCompare(); add_varargs_method("get", &LazyValue::get, "get()\n"); add_varargs_method("set", &LazyValue::set, "set(val)\n"); }
void FuncXY::init_type() { _VERBOSE("FuncXY::init_type"); behaviors().name("FuncXY"); behaviors().doc("Map double,double -> funcx(double), funcy(double)"); add_varargs_method("map", &FuncXY::map, "map(x,y)\n"); add_varargs_method("inverse", &FuncXY::inverse, "inverse(x,y)\n"); add_varargs_method("set_type", &FuncXY::set_type, "set_type(TYPE)\n"); add_varargs_method("get_type", &FuncXY::get_type, "get_type()\n"); }
void Func::init_type() { _VERBOSE("Func::init_type"); behaviors().name("Func"); behaviors().doc("Map double -> double"); behaviors().supportRepr(); add_varargs_method("map", &Func::map, "map(x)\n"); add_varargs_method("inverse", &Func::inverse, "inverse(y)\n"); add_varargs_method("set_type", &Func::set_type, "set_type(TYPE)\n"); add_varargs_method("get_type", &Func::get_type, "get_type()\n"); }
Module() : Py::ExtensionModule<Module>("Path") { add_varargs_method("write",&Module::write, "write(object,filename): Exports a given path object to a GCode file" ); add_varargs_method("read",&Module::read, "read(filename,[document]): Imports a GCode file into the given document" ); add_varargs_method("show",&Module::show, "show(path): Add the path to the active document or create one if no document exists" ); initialize("This module is the Path module."); // register with Python }
Module() : Py::ExtensionModule<Module>("PathGui") { add_varargs_method("open",&Module::open, "open(filename): Opens a GCode file as a new document" ); add_varargs_method("insert",&Module::insert, "insert(filename,docname): Imports a given GCode file into the given document" ); add_varargs_method("export",&Module::exporter, "export(objectslist,filename): Exports a given list of Path objects to a GCode file" ); initialize("This module is the PathGui module."); // register with Python }
TriModule::TriModule() : Py::ExtensionModule<TriModule>("tri") { Triangulation::init_type(); TriContourGenerator::init_type(); add_varargs_method("Triangulation", &TriModule::new_triangulation, "Create and return new C++ Triangulation object"); add_varargs_method("TriContourGenerator", &TriModule::new_tricontourgenerator, "Create and return new C++ TriContourGenerator object"); initialize("Module for unstructured triangular grids"); }
Module() : Py::ExtensionModule<Module>("MeshPart") { add_varargs_method("loftOnCurve",&Module::loftOnCurve, "Loft on curve." ); add_varargs_method("wireFromSegment",&Module::wireFromSegment, "Create wire(s) from boundary of segment" ); add_keyword_method("meshFromShape",&Module::meshFromShape, "Create mesh from shape" ); initialize("This module is the MeshPart module."); // register with Python }
void TriContourGenerator::init_type() { _VERBOSE("TriContourGenerator::init_type"); behaviors().name("TriContourGenerator"); behaviors().doc("TriContourGenerator"); add_varargs_method("create_contour", &TriContourGenerator::create_contour, "create_contour(level)"); add_varargs_method("create_filled_contour", &TriContourGenerator::create_filled_contour, "create_filled_contour(lower_level, upper_level)"); }
Module() : Py::ExtensionModule<Module>("_PartDesign") { add_varargs_method("makeFilletArc",&Module::makeFilletArc, "makeFilletArc(...) -- Fillet arc." ); initialize("This module is the PartDesign module."); // register with Python }
_gtkagg_module() : Py::ExtensionModule<_gtkagg_module>("_gtkagg") { add_varargs_method("agg_to_gtk_drawable", &_gtkagg_module::agg_to_gtk_drawable, "Draw to a gtk drawable from a agg buffer."); initialize("The _gtkagg module"); }
TestProp() : ExtensionModule("testprop") { add_varargs_method("add_properties", &TestProp::add_properties, ""); initialize("testprop"); }
Module() : Py::ExtensionModule<Module>("Fem") { add_varargs_method("open",&Module::open, "open(string) -- Create a new document and a Mesh::Import feature to load the file into the document." ); add_varargs_method("insert",&Module::insert, "insert(string|mesh,[string]) -- Load or insert a mesh into the given or active document." ); add_varargs_method("export",&Module::exporter, "export(list,string) -- Export a list of objects into a single file." ); add_varargs_method("read",&Module::read, "Read a mesh from a file and returns a Mesh object." ); #ifdef FC_USE_VTK add_varargs_method("readResult",&Module::readResult, "Read a CFD or Mechanical result (auto detect) from a file (file format detected from file suffix)" ); add_varargs_method("writeResult",&Module::writeResult, "write a CFD or FEM result (auto detect) to a file (file format detected from file suffix)" ); #endif add_varargs_method("show",&Module::show, "show(shape,[string]) -- Add the mesh to the active document or create one if no document exists." ); initialize("This module is the Fem module."); // register with Python }
void Interval::init_type() { _VERBOSE("Interval::init_type"); behaviors().name("Interval"); behaviors().doc("A 1D interval"); add_varargs_method("contains", &Interval::contains, "contains(x)\n"); add_varargs_method("update", &Interval::update, "update(vals)\n"); add_varargs_method("contains_open", &Interval::contains_open, "contains_open(x)\n"); add_varargs_method("get_bounds", &Interval::get_bounds, "get_bounds()\n"); add_varargs_method("set_bounds", &Interval::set_bounds, "set_bounds()\n"); add_varargs_method("shift", &Interval::shift, "shift()\n"); add_varargs_method("span", &Interval::span, "span()\n"); add_varargs_method("val1", &Interval::val1, "val1()\n"); add_varargs_method("val2", &Interval::val2, "val2()\n"); add_varargs_method("minpos", &Interval::minpos, "minpos()\n"); }
Module() : Py::ExtensionModule<Module>("Fem") { add_varargs_method("open",&Module::open, "open(string) -- Create a new document and a Mesh::Import feature to load the file into the document." ); add_varargs_method("insert",&Module::insert, "insert(string|mesh,[string]) -- Load or insert a mesh into the given or active document." ); add_varargs_method("export",&Module::exporter, "export(list,string) -- Export a list of objects into a single file." ); add_varargs_method("read",&Module::read, "Read a mesh from a file and returns a Mesh object." ); add_varargs_method("show",&Module::show, "show(shape) -- Add the shape to the active document or create one if no document exists." ); initialize("This module is the Fem module."); // register with Python }
pymur_module() : Py::ExtensionModule<pymur_module>("pymur") { pymur_index::init_type(); pymur_index_environment::init_type(); pymur_query_environment::init_type(); pymur_parsed_document::init_type(); pymur_scored_extent_result::init_type(); pymur_field_info::init_type(); add_varargs_method("Index", &pymur_module::new_index, "Index(<location>): class for running standard queries and determining basic index information"); add_varargs_method("IndexEnvironment", &pymur_module::new_index_environment, "IndexEnvironment(): class for creating indexes"); add_varargs_method("QueryEnvironment", &pymur_module::new_query_environment, "QueryEnvironment(): class for making queries"); add_varargs_method("ParsedDocument", &pymur_module::new_parsed_document, "ParsedDocument(): class that represents a parsed document. Has content, text, metadata, and terms attributes."); add_varargs_method("ScoredExtentResult", &pymur_module::new_scored_extent_result, "ScoredExtentResult(): query result type. Has score, begin, end, document, and number attributes."); add_varargs_method("FieldInfo", &pymur_module::new_field_info, "FieldInfo(): an object to store information about fields. Has id, begin, end, parentOrdinal, " "ordinal, and number attributes."); string description = "A python interface to the Lemur Toolkit. See " + string(PACKAGE_URL) + " for more information."; initialize(description.c_str()); vector<string> version_parts = explode(string(PACKAGE_VERSION), "."); Py::Tuple version(version_parts.size()); for(int i=0; i<version_parts.size(); i++) { int vpart = atoi(version_parts[i].c_str()); version[i] = Py::Int(vpart); } Py::Dict d(moduleDictionary()); d["version"] = version; d["copyright"] = Py::String("Copyright 2009 Brian Muller <*****@*****.**>"); };
Module() : Py::ExtensionModule<Module>("ReverseEngineering") { add_keyword_method("approxSurface",&Module::approxSurface, "approxSurface(Points=,UDegree=3,VDegree=3,NbUPoles=6,NbVPoles=6,Smooth=True)\n" "Weight=0.1,Grad=1.0,Bend=0.0,\n" "Iterations=5,Correction=True,PatchFactor=1.0" ); #if defined(HAVE_PCL_SURFACE) add_varargs_method("triangulate",&Module::triangulate, "triangulate(PointKernel,searchRadius[,mu=2.5])." ); #endif initialize("This module is the ReverseEngineering module."); // register with Python }
void Triangulation::init_type() { _VERBOSE("Triangulation::init_type"); behaviors().name("Triangulation"); behaviors().doc("Triangulation"); add_noargs_method("get_edges", &Triangulation::get_edges, "get_edges()"); add_noargs_method("get_neighbors", &Triangulation::get_neighbors, "get_neighbors()"); add_varargs_method("set_mask", &Triangulation::set_mask, "set_mask(mask)"); }
Module() : Py::ExtensionModule<Module>("Drawing") { add_varargs_method("project",&Module::project, "[visiblyG0,visiblyG1,hiddenG0,hiddenG1] = project(TopoShape[,App.Vector Direction, string type])\n" " -- Project a shape and return the visible/invisible parts of it." ); add_varargs_method("projectEx",&Module::projectEx, "[V,V1,VN,VO,VI,H,H1,HN,HO,HI] = projectEx(TopoShape[,App.Vector Direction, string type])\n" " -- Project a shape and return the all parts of it." ); add_keyword_method("projectToSVG",&Module::projectToSVG, "string = projectToSVG(TopoShape[, App.Vector direction, string type, float tolerance, dict vStyle, dict v0Style, dict v1Style, dict hStyle, dict h0Style, dict h1Style])\n" " -- Project a shape and return the SVG representation as string." ); add_varargs_method("projectToDXF",&Module::projectToDXF, "string = projectToDXF(TopoShape[,App.Vector Direction, string type])\n" " -- Project a shape and return the DXF representation as string." ); add_varargs_method("removeSvgTags",&Module::removeSvgTags, "string = removeSvgTags(string) -- Removes the opening and closing svg tags\n" "and other metatags from a svg code, making it embeddable" ); initialize("This module is the Drawing module."); // register with Python }
Module() : Py::ExtensionModule<Module>("Raytracing") { add_varargs_method("writeProjectFile",&Module::writeProjectFile ); add_varargs_method("getProjectFile",&Module::getProjectFile ); add_varargs_method("getPartAsPovray",&Module::getPartAsPovray ); add_varargs_method("getPartAsLux",&Module::getPartAsLux ); add_varargs_method("writePartFile",&Module::writePartFile ); add_varargs_method("writeDataFile",&Module::writeDataFile ); add_varargs_method("writePartFileCSV",&Module::writePartFileCSV ); add_varargs_method("writeCameraFile",&Module::writeCameraFile ); add_varargs_method("copyResource",&Module::copyResource ); initialize("This module is the Raytracing module."); // register with Python }
CyPy_Rules::CyPy_Rules() : ExtensionModule("rules") { CyPy_Props::init_type(); CyPy_WorldTime::init_type(); CyPy_Location::init_type(); CyPy_EntityLocation::init_type(); add_varargs_method("isLocation", &CyPy_Rules::is_location, ""); initialize("Rules"); Py::Dict d(moduleDictionary()); d["Location"] = CyPy_Location::type(); d["EntityLocation"] = CyPy_EntityLocation::type(); d["WorldTime"] = CyPy_WorldTime::type(); }
void FT2Font::init_type() { _VERBOSE("FT2Font::init_type"); behaviors().name("FT2Font"); behaviors().doc("FT2Font"); add_varargs_method("clear", &FT2Font::clear, FT2Font::clear__doc__); add_varargs_method("write_bitmap", &FT2Font::write_bitmap, FT2Font::write_bitmap__doc__); add_varargs_method("set_bitmap_size", &FT2Font::set_bitmap_size, FT2Font::load_char__doc__); add_varargs_method("draw_rect",&FT2Font::draw_rect, FT2Font::draw_rect__doc__); add_varargs_method("draw_glyph_to_bitmap", &FT2Font::draw_glyph_to_bitmap, FT2Font::draw_glyph_to_bitmap__doc__); add_varargs_method("draw_glyphs_to_bitmap", &FT2Font::draw_glyphs_to_bitmap, FT2Font::draw_glyphs_to_bitmap__doc__); add_varargs_method("get_glyph", &FT2Font::get_glyph, FT2Font::get_glyph__doc__); add_varargs_method("get_num_glyphs", &FT2Font::get_num_glyphs, FT2Font::get_num_glyphs__doc__); add_varargs_method("image_as_str", &FT2Font::image_as_str, FT2Font::image_as_str__doc__); add_varargs_method("load_char", &FT2Font::load_char, FT2Font::load_char__doc__); add_varargs_method("set_text", &FT2Font::set_text, FT2Font::set_text__doc__); add_varargs_method("set_size", &FT2Font::set_size, FT2Font::set_size__doc__); add_varargs_method("get_width_height", &FT2Font::get_width_height, FT2Font::get_width_height__doc__); add_varargs_method("get_glyph_name", &FT2Font::get_glyph_name, FT2Font::get_glyph_name__doc__); add_varargs_method("get_charmap", &FT2Font::get_charmap, FT2Font::get_charmap__doc__); add_varargs_method("get_sfnt", &FT2Font::get_sfnt, FT2Font::get_sfnt__doc__); add_varargs_method("get_name_index", &FT2Font::get_name_index, FT2Font::get_name_index__doc__); add_varargs_method("get_ps_font_info", &FT2Font::get_ps_font_info, FT2Font::get_ps_font_info__doc__); add_varargs_method("get_sfnt_table", &FT2Font::get_sfnt_table, FT2Font::get_sfnt_table__doc__); add_varargs_method("horiz_image_to_vert_image", &FT2Font::horiz_image_to_vert_image, FT2Font::horiz_image_to_vert_image__doc__); behaviors().supportGetattr(); behaviors().supportSetattr(); };
void Transformation::init_type() { _VERBOSE("Transformation::init_type"); behaviors().name("Transformation"); behaviors().doc("Transformation base class"); add_varargs_method("freeze", &Transformation::freeze, "freeze(); eval and freeze the lazy objects\n"); add_varargs_method("thaw", &Transformation::thaw, "thaw(); release the laszy objects\n"); add_varargs_method("get_bbox1", &Transformation::get_bbox1, "get_bbox1(); return the input bbox\n"); add_varargs_method("get_bbox2", &Transformation::get_bbox2, "get_bbox2(); return the output bbox\n"); add_varargs_method("set_bbox1", &Transformation::set_bbox1, "set_bbox1(); set the input bbox\n"); add_varargs_method("set_bbox2", &Transformation::set_bbox2, "set_bbox2(); set the output bbox\n"); add_varargs_method("get_funcx", &Transformation::get_funcx, "get_funcx(); return the Func instance on x\n"); add_varargs_method("get_funcy", &Transformation::get_funcy, "get_funcy(); return the Func instance on y\n"); add_varargs_method("set_funcx", &Transformation::set_funcx, "set_funcx(); set the Func instance on x\n"); add_varargs_method("set_funcy", &Transformation::set_funcy, "set_funcy(); set the Func instance on y\n"); add_varargs_method("get_funcxy", &Transformation::get_funcxy, "get_funcxy(); return the FuncXY instance\n"); add_varargs_method("set_funcxy", &Transformation::set_funcxy, "set_funcxy(); set the FuncXY instance\n"); add_varargs_method("xy_tup", &Transformation::xy_tup, "xy_tup(xy)\n"); add_varargs_method("seq_x_y", &Transformation::seq_x_y, "seq_x_y(x, y)\n"); add_varargs_method("numerix_x_y", &Transformation::numerix_x_y, "numerix_x_y(x, y)\n"); add_varargs_method("seq_xy_tups", &Transformation::seq_xy_tups, "seq_xy_tups(seq)\n"); add_varargs_method("inverse_xy_tup", &Transformation::inverse_xy_tup, "inverse_xy_tup(xy)\n"); add_varargs_method("set_offset", &Transformation::set_offset, "set_offset(xy, trans)\n"); add_varargs_method("as_vec6", &Transformation::as_vec6, "as_vec6(): return the affine as length 6 list of Values\n"); add_varargs_method("deepcopy", &Transformation::deepcopy, "deepcopy()\n"); }
void Bbox::init_type() { _VERBOSE("Bbox::init_type"); behaviors().name("Bbox"); behaviors().doc("A 2D bounding box"); add_varargs_method("ll", &Bbox::ll, "ll()\n"); add_varargs_method("ur", &Bbox::ur, "ur()\n"); add_varargs_method("contains" , &Bbox::contains, "contains(x,y)\n"); add_varargs_method("overlaps" , &Bbox::overlaps, "overlaps(bbox)\n"); add_varargs_method("overlapsx" , &Bbox::overlapsx, "overlapsx(bbox)\n"); add_varargs_method("overlapsy" , &Bbox::overlapsy, "overlapsy(bbox)\n"); add_varargs_method("intervalx" , &Bbox::intervalx, "intervalx()\n"); add_varargs_method("intervaly" , &Bbox::intervaly, "intervaly()\n"); add_varargs_method("get_bounds", &Bbox::get_bounds, "get_bounds()\n"); add_varargs_method("update" , &Bbox::update, "update(xys, ignore)\n"); add_varargs_method("width", &Bbox::width, "width()\n"); add_varargs_method("height", &Bbox::height, "height()\n"); add_varargs_method("xmax", &Bbox::xmax, "xmax()\n"); add_varargs_method("ymax", &Bbox::ymax, "ymax()\n"); add_varargs_method("xmin", &Bbox::xmin, "xmin()\n"); add_varargs_method("ymin", &Bbox::ymin, "ymin()\n"); add_varargs_method("scale", &Bbox::scale, "scale(sx,sy)"); add_varargs_method("deepcopy", &Bbox::deepcopy, "deepcopy()\n"); }