From ecce5eea6dcd63e8d4a653cd2067df2136e8f487 Mon Sep 17 00:00:00 2001 From: tomate44 Date: Sun, 21 Jan 2018 12:03:53 +0100 Subject: [PATCH] fix some TopoShape documentation --- src/Mod/Part/App/TopoShapeCompoundPy.xml | 7 +++-- src/Mod/Part/App/TopoShapePy.xml | 4 ++- src/Mod/Part/App/TopoShapeSolidPy.xml | 6 ++-- src/Mod/Part/App/TopoShapeWirePy.xml | 35 +++++++++++++----------- 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/src/Mod/Part/App/TopoShapeCompoundPy.xml b/src/Mod/Part/App/TopoShapeCompoundPy.xml index 2439bfc7fc..f0863e1d44 100644 --- a/src/Mod/Part/App/TopoShapeCompoundPy.xml +++ b/src/Mod/Part/App/TopoShapeCompoundPy.xml @@ -21,8 +21,11 @@ - Build a compound of wires out of the edges of this compound. + Build a compound of wires out of the edges of this compound. + myCompound.connectEdgesToWires( Shared = True, Tolerance = 1e-7) + If Shared is True connection is performed only when adjacent edges share the same vertex. + If Shared is False connection is performed only when ends of adjacent edges are at distance less than Tolerance. - + diff --git a/src/Mod/Part/App/TopoShapePy.xml b/src/Mod/Part/App/TopoShapePy.xml index d355470b05..ae490298aa 100644 --- a/src/Mod/Part/App/TopoShapePy.xml +++ b/src/Mod/Part/App/TopoShapePy.xml @@ -135,7 +135,9 @@ Part.show(r) Checks the shape and report errors in the shape structure. -This is a more detailed check as done in isValid(). +This is a more detailed check as done in isValid(). +myShape.check(runBopCheck = False) +if runBopCheck is True, a BOPCheck analysis is also performed. diff --git a/src/Mod/Part/App/TopoShapeSolidPy.xml b/src/Mod/Part/App/TopoShapeSolidPy.xml index 3b4203aea5..932d484815 100644 --- a/src/Mod/Part/App/TopoShapeSolidPy.xml +++ b/src/Mod/Part/App/TopoShapeSolidPy.xml @@ -82,12 +82,14 @@ shape if the solid has no shells - computes the moment of inertia of the material system about the axis A. + computes the moment of inertia of the material system about the axis A. +mySolid.getMomentOfInertia( point, direction ) - Returns the radius of gyration of the current system about the axis A. + Returns the radius of gyration of the current system about the axis A. +mySolid.getRadiusOfGyration( point, direction ) diff --git a/src/Mod/Part/App/TopoShapeWirePy.xml b/src/Mod/Part/App/TopoShapeWirePy.xml index 4d8e532cb9..65930d8e1d 100644 --- a/src/Mod/Part/App/TopoShapeWirePy.xml +++ b/src/Mod/Part/App/TopoShapeWirePy.xml @@ -14,22 +14,25 @@ TopoShapeWire is the OpenCasCade topological wire wrapper - - - Offset the shape by a given amount. DEPRECATED - use makeOffset2D instead. - - - - - Add an edge to the wire - - - - - Fix wire - - - + + + Offset the shape by a given amount. DEPRECATED - use makeOffset2D instead. + + + + + Add an edge to the wire + + + + + Fix wire +A face and a tolerance can optionally be supplied to the algorithm : +myWire.fixWire( face, tolerance ) + + + + Make this and the given wire homogenous to have the same number of edges