From ad49a96b142b0524e6b6fcd772b028896d9dfd0f Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 12 Nov 2016 15:31:35 +0100 Subject: [PATCH] methods to analyze shape tolerances --- src/Mod/Part/App/TopoShapePy.xml | 47 +++++++ src/Mod/Part/App/TopoShapePyImp.cpp | 189 ++++++++++++++++++++++++++-- 2 files changed, 225 insertions(+), 11 deletions(-) diff --git a/src/Mod/Part/App/TopoShapePy.xml b/src/Mod/Part/App/TopoShapePy.xml index 22a1d31e5..1ba66c04e 100644 --- a/src/Mod/Part/App/TopoShapePy.xml +++ b/src/Mod/Part/App/TopoShapePy.xml @@ -539,6 +539,53 @@ infos contains additional info on the solutions. It is a list of tuples: Returns a SubElement + + + + getTolerance(mode, ShapeType=Shape) -> float + Determines a tolerance from the ones stored in a shape + mode = 0 : returns the average value between sub-shapes, + mode > 0 : returns the maximal found, + mode < 0 : returns the minimal found. + ShapeType defines what kinds of sub-shapes to consider: + Shape (default) : all : Vertex, Edge, Face, + Vertex : only vertices, + Edge : only edges, + Face : only faces, + Shell : combined Shell + Face, for each face (and containing + shell), also checks edge and Vertex + + + + + + + overTolerance(value, ShapeType=Shape) -> float + Determines which shapes have a tolerance over the given value + ShapeType is interpreted as in the method getTolerance + + + + + + + inTolerance(value, ShapeType=Shape) -> float + Determines which shapes have a tolerance within a given interval + ShapeType is interpreted as in the method getTolerance + + + + + + + globalTolerance(mode) -> float + Returns the computed tolerance according to the mode + mode = 0 : average + mode > 0 : maximal + mode < 0 : minimal + + +