diff --git a/src/Mod/Draft/draftgeoutils/arcs.py b/src/Mod/Draft/draftgeoutils/arcs.py index 719f53d964..d6a09e2835 100644 --- a/src/Mod/Draft/draftgeoutils/arcs.py +++ b/src/Mod/Draft/draftgeoutils/arcs.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for arc operations.""" +"""Provides various functions to work with arcs.""" ## @package arcs -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for arc operations. +# \ingroup draftgeoutils +# \brief Provides various functions to work with arcs. import math import lazy_loader.lazy_loader as lz @@ -37,6 +37,9 @@ from draftgeoutils.general import geomType # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def isClockwise(edge, ref=None): """Return True if a circle-based edge has a clockwise direction.""" @@ -142,3 +145,5 @@ def arcFromSpline(edge): except Part.OCCError: print("couldn't make a circle out of this edge") return None + +## @} diff --git a/src/Mod/Draft/draftgeoutils/circle_inversion.py b/src/Mod/Draft/draftgeoutils/circle_inversion.py index c46dfdaf2b..c48436109a 100644 --- a/src/Mod/Draft/draftgeoutils/circle_inversion.py +++ b/src/Mod/Draft/draftgeoutils/circle_inversion.py @@ -26,7 +26,7 @@ http://en.wikipedia.org/wiki/Inversive_geometry """ ## @package circle_inversion -# \ingroup DRAFTGEOUTILS +# \ingroup draftgeoutils # \brief Provides various functions for inversive geometry operations. import lazy_loader.lazy_loader as lz @@ -40,6 +40,9 @@ from draftgeoutils.geometry import findDistance # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def pointInversion(circle, point): """Return the circle inversion of a point. @@ -117,3 +120,5 @@ def circleInversion(circle, circle2): return Part.Circle(invCen2, NORM, DraftVecUtils.dist(invCen2, invPointOnCircle2)) + +## @} diff --git a/src/Mod/Draft/draftgeoutils/circles.py b/src/Mod/Draft/draftgeoutils/circles.py index fc0f6727c7..14ac11f41d 100644 --- a/src/Mod/Draft/draftgeoutils/circles.py +++ b/src/Mod/Draft/draftgeoutils/circles.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for circle operations.""" +"""Provides various functions to work with circles.""" ## @package circles -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for circle operations. +# \ingroup draftgeoutils +# \brief Provides various functions to work with circles. import math import lazy_loader.lazy_loader as lz @@ -40,6 +40,9 @@ from draftgeoutils.intersections import findIntersection, angleBisection # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def findClosestCircle(point, circles): """Return the circle with closest center to a given point.""" @@ -490,3 +493,5 @@ def findRadicalCenter(circle1, circle2, circle3): else: # No radical center could be calculated. return None + +## @} diff --git a/src/Mod/Draft/draftgeoutils/circles_apollonius.py b/src/Mod/Draft/draftgeoutils/circles_apollonius.py index b1313e9dd6..e1f975b4f9 100644 --- a/src/Mod/Draft/draftgeoutils/circles_apollonius.py +++ b/src/Mod/Draft/draftgeoutils/circles_apollonius.py @@ -21,7 +21,7 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for Appollonius and Soddy circle operations. +"""Provides various functions for Apollonius and Soddy circle operations. The 'problem of Appollonius' consists of finding a circle that is simultaneously tangent to three circles on a plane. @@ -40,8 +40,8 @@ and an outer circle. - http://mathworld.wolfram.com/OuterSoddyCenter.html """ ## @package circles_apollonius -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for Appollonius and Soddy circles. +# \ingroup draftgeoutils +# \brief Provides various functions for Apollonius and Soddy circles. import cmath import math @@ -55,6 +55,9 @@ from draftgeoutils.intersections import findIntersection # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def outerSoddyCircle(circle1, circle2, circle3): """Compute the outer soddy circle for three tightly packed circles. @@ -218,3 +221,5 @@ def circleFrom3CircleTangents(circle1, circle2, circle3): else: # Some circles are inside each other or an error has occurred. return None + +## @} diff --git a/src/Mod/Draft/draftgeoutils/circles_incomplete.py b/src/Mod/Draft/draftgeoutils/circles_incomplete.py index 8ac63f224c..e410e0bb66 100644 --- a/src/Mod/Draft/draftgeoutils/circles_incomplete.py +++ b/src/Mod/Draft/draftgeoutils/circles_incomplete.py @@ -48,9 +48,11 @@ or to a circular edge, so even more combinations are possible. And so on, with the other combinations. """ ## @package circles_incomplete -# \ingroup DRAFTGEOUTILS +# \ingroup draftgeoutils # \brief Provides various incomplete functions for creating circles. +## \addtogroup draftgeoutils +# @{ import FreeCAD from draftutils.messages import _wrn @@ -216,3 +218,5 @@ def circleFrom3tan(tan1, tan2, tan3): elif tan1IsCircle and tan2IsCircle and tan3IsLine: return circleFrom2Circle1Lines(tan1, tan2, tan3) + +## @} diff --git a/src/Mod/Draft/draftgeoutils/cuboids.py b/src/Mod/Draft/draftgeoutils/cuboids.py index 4da70a84e5..9de283a152 100644 --- a/src/Mod/Draft/draftgeoutils/cuboids.py +++ b/src/Mod/Draft/draftgeoutils/cuboids.py @@ -21,11 +21,13 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for cubic shapes (parallelepipeds).""" +"""Provides various functions to work with cubic shapes (parallelepipeds).""" ## @package cuboids -# \ingroup DRAFTGEOUTILS +# \ingroup draftgeoutils # \brief Provides various functions for cubic shapes (parallelepipeds). +## \addtogroup draftgeoutils +# @{ import math import FreeCAD as App @@ -128,3 +130,5 @@ def getCubicDimensions(shape): round(vx.Length, precision()), round(vy.Length, precision()), round(vz.Length, precision())] + +## @} diff --git a/src/Mod/Draft/draftgeoutils/edges.py b/src/Mod/Draft/draftgeoutils/edges.py index d1bb464b3b..9715080763 100644 --- a/src/Mod/Draft/draftgeoutils/edges.py +++ b/src/Mod/Draft/draftgeoutils/edges.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for using edges.""" +"""Provides various functions to work with edges.""" ## @package edges -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for using edges. +# \ingroup draftgeoutils +# \brief Provides various functions to work with edges. import lazy_loader.lazy_loader as lz @@ -36,6 +36,9 @@ from draftgeoutils.general import geomType, vec # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def findEdge(anEdge, aList): """Return True if edge is found in list of edges.""" @@ -205,3 +208,5 @@ def getTangent(edge, from_point=None): return v1.cross(edge.Curve.Axis) return None + +## @} diff --git a/src/Mod/Draft/draftgeoutils/faces.py b/src/Mod/Draft/draftgeoutils/faces.py index 9eb0252dc4..7ab1ec7339 100644 --- a/src/Mod/Draft/draftgeoutils/faces.py +++ b/src/Mod/Draft/draftgeoutils/faces.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for working with faces.""" +"""Provides various functions to work with faces.""" ## @package faces -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for working with faces. +# \ingroup draftgeoutils +# \brief Provides various functions to work with faces. import lazy_loader.lazy_loader as lz @@ -35,6 +35,9 @@ from draftgeoutils.general import precision # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def concatenate(shape): """Turn several faces into one.""" @@ -258,3 +261,5 @@ def removeSplitter(shape): return face return None + +## @} diff --git a/src/Mod/Draft/draftgeoutils/fillets.py b/src/Mod/Draft/draftgeoutils/fillets.py index 7967ce0e85..6e0c8ed020 100644 --- a/src/Mod/Draft/draftgeoutils/fillets.py +++ b/src/Mod/Draft/draftgeoutils/fillets.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for working with fillets.""" +"""Provides various functions to work with fillets.""" ## @package fillets -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for working with fillets. +# \ingroup draftgeoutils +# \brief Provides various functions to work with fillets. import math import lazy_loader.lazy_loader as lz @@ -38,6 +38,9 @@ from draftgeoutils.wires import isReallyClosed # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def fillet(lEdges, r, chamfer=False): """Return a list of sorted edges describing a round corner. @@ -393,3 +396,5 @@ def filletWire(aWire, r, chamfer=False): filEdges[0] = result[2] return Part.Wire(filEdges) + +## @} diff --git a/src/Mod/Draft/draftgeoutils/general.py b/src/Mod/Draft/draftgeoutils/general.py index 080c88f3dc..5ef9be80ec 100644 --- a/src/Mod/Draft/draftgeoutils/general.py +++ b/src/Mod/Draft/draftgeoutils/general.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides general functions for shape operations.""" +"""Provides general functions to work with topological shapes.""" ## @package general -# \ingroup DRAFTGEOUTILS -# \brief Provides basic functions for shape operations. +# \ingroup draftgeoutils +# \brief Provides general functions to work with topological shapes. import math import lazy_loader.lazy_loader as lz @@ -35,6 +35,8 @@ import DraftVecUtils # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ PARAMGRP = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") # Default normal direction for all geometry operations @@ -339,3 +341,5 @@ def getBoundaryAngles(angle, alist): higher = a return lower, higher + +## @} diff --git a/src/Mod/Draft/draftgeoutils/geometry.py b/src/Mod/Draft/draftgeoutils/geometry.py index 6f8d7edfee..c98d2a0040 100644 --- a/src/Mod/Draft/draftgeoutils/geometry.py +++ b/src/Mod/Draft/draftgeoutils/geometry.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for working with geometrical elements.""" +"""Provides various functions for general geometrical calculations.""" ## @package geometry -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for working with geometry. +# \ingroup draftgeoutils +# \brief Provides various functions for general geometrical calculations. import math import lazy_loader.lazy_loader as lz @@ -39,6 +39,9 @@ from draftgeoutils.general import geomType, vec # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def findPerpendicular(point, edgeslist, force=None): """Find the perpendicular distance between a point and a list of edges. @@ -333,3 +336,5 @@ def mirror(point, edge): return refl else: return None + +## @} diff --git a/src/Mod/Draft/draftgeoutils/intersections.py b/src/Mod/Draft/draftgeoutils/intersections.py index fb7668c741..b1b3e02535 100644 --- a/src/Mod/Draft/draftgeoutils/intersections.py +++ b/src/Mod/Draft/draftgeoutils/intersections.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides basic functions for calculating intersections of shapes.""" +"""Provides various functions to calculate intersections of shapes.""" ## @package intersections -# \ingroup DRAFTGEOUTILS -# \brief Provides basic functions for calculating intersections of shapes. +# \ingroup draftgeoutils +# \brief Provides various functions to calculate intersections of shapes. import lazy_loader.lazy_loader as lz @@ -37,6 +37,9 @@ from draftgeoutils.edges import findMidpoint # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def findIntersection(edge1, edge2, infinite1=False, infinite2=False, @@ -411,3 +414,5 @@ def angleBisection(edge1, edge2): direction.normalize() return Part.LineSegment(origin, origin.add(direction)).toShape() + +## @} diff --git a/src/Mod/Draft/draftgeoutils/linear_algebra.py b/src/Mod/Draft/draftgeoutils/linear_algebra.py index e2e26272f5..0a83b4692b 100644 --- a/src/Mod/Draft/draftgeoutils/linear_algebra.py +++ b/src/Mod/Draft/draftgeoutils/linear_algebra.py @@ -21,14 +21,16 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for linear algebraic operations. +"""Provides various functions for linear algebra. This includes calculating linear equation parameters, and matrix determinants. """ ## @package linear_algebra -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for linear algebraic operations. +# \ingroup draftgeoutils +# \brief Provides various functions for linear algebra. +## \addtogroup draftgeoutils +# @{ import FreeCAD as App @@ -82,3 +84,5 @@ def determinant(mat, n): return d else: return 0 + +## @} diff --git a/src/Mod/Draft/draftgeoutils/offsets.py b/src/Mod/Draft/draftgeoutils/offsets.py index b90077a50c..bb15fb7a14 100644 --- a/src/Mod/Draft/draftgeoutils/offsets.py +++ b/src/Mod/Draft/draftgeoutils/offsets.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for offset operations.""" +"""Provides various functions to work with offsets.""" ## @package offsets -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for offset operations. +# \ingroup draftgeoutils +# \brief Provides various functions to work with offsets. import lazy_loader.lazy_loader as lz @@ -39,6 +39,9 @@ from draftgeoutils.intersections import wiresIntersect, connect # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def pocket2d(shape, offset): """Return a list of wires obtained from offsetting wires from the shape. @@ -493,3 +496,5 @@ def offsetWire(wire, dvec, bind=False, occ=False, return w else: return nedges + +## @} diff --git a/src/Mod/Draft/draftgeoutils/sort_edges.py b/src/Mod/Draft/draftgeoutils/sort_edges.py index b7b42720a8..6c2c516b46 100644 --- a/src/Mod/Draft/draftgeoutils/sort_edges.py +++ b/src/Mod/Draft/draftgeoutils/sort_edges.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for sorting edges.""" +"""Provides various functions to sort lists of edges.""" ## @package sort_edges -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for sorting edges. +# \ingroup draftgeoutils +# \brief Provides various functions to sort lists of edges. import lazy_loader.lazy_loader as lz @@ -34,6 +34,9 @@ from draftgeoutils.edges import findMidpoint, isLine, invert # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def sortEdges(edges): """Sort edges. Deprecated. Use Part.__sortEdges__ instead.""" @@ -221,3 +224,5 @@ def sortEdgesOld(lEdges, aVertex=None): return olEdges else: return [] + +## @} diff --git a/src/Mod/Draft/draftgeoutils/wires.py b/src/Mod/Draft/draftgeoutils/wires.py index c762e6c506..4d6133b8b1 100644 --- a/src/Mod/Draft/draftgeoutils/wires.py +++ b/src/Mod/Draft/draftgeoutils/wires.py @@ -21,10 +21,10 @@ # * USA * # * * # *************************************************************************** -"""Provides various functions for working with wires.""" +"""Provides various functions to work with wires.""" ## @package wires -# \ingroup DRAFTGEOUTILS -# \brief Provides various functions for working with wires. +# \ingroup draftgeoutils +# \brief Provides various functions to work with wires. import math import lazy_loader.lazy_loader as lz @@ -39,6 +39,9 @@ from draftgeoutils.edges import findMidpoint, isLine # Delay import of module until first use because it is heavy Part = lz.LazyLoader("Part", globals(), "Part") +## \addtogroup draftgeoutils +# @{ + def findWires(edgeslist): """Find wires in a list of edges.""" @@ -429,3 +432,5 @@ def tessellateProjection(shape, seglen): print("Debug: error cleaning edge ", e) return Part.makeCompound(newedges) + +## @}