Draft: add modules of draftgeoutils to the proper Doxygen group
This includes `arcs`, `circle_inversion`, `circles`, `circles_apollonius`, `circles_incomplete`, `cuboids`, `edges`, `faces`, `fillets`, `general`, `geometry`, `intersections`, `linear_geometry`, `offsets`, `sort_edges`, `wires`. These are added to the `draftgeoutils` Doxygen group so that the functions contained in each module are listed appropriately in the automatically generated documentation.
This commit is contained in:
@@ -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
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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))
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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)
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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())]
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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)
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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()
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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 []
|
||||
|
||||
## @}
|
||||
|
||||
@@ -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)
|
||||
|
||||
## @}
|
||||
|
||||
Reference in New Issue
Block a user