Code: Select all
sh.fix(0.1,0,1) # fixes self-intersecting wires
Code: Select all
Tries to fix a broken shape. True is returned if the operation succeeded. False otherwise.
fix(working precision, minimum precision, maximum precision)
Thanks.
Code: Select all
sh.fix(0.1,0,1) # fixes self-intersecting wires
Code: Select all
Tries to fix a broken shape. True is returned if the operation succeeded. False otherwise.
fix(working precision, minimum precision, maximum precision)
This is a function of Part::TopoShape, which is the internal object that Part creates to hold the geometry.paullee wrote: ↑Wed Oct 09, 2019 6:05 pm ...Code: Select all
Tries to fix a broken shape. True is returned if the operation succeeded. False otherwise. fix(working precision, minimum precision, maximum precision)
ShapeFix_Shape Class Reference wrote: ShapeFix_Shape::Perform ( const Handle< Message_ProgressIndicator > & theProgress = 0 )
Iterates on sub- shape and performs fixes.
After the parameters are set in ShapeFix_Shape, the real work is done here:vocx wrote: ↑Wed Oct 09, 2019 6:34 pm But as you see, it calls other classes and functions, like ShapeFix_Shape. This function seems to come from # include <ShapeFix_Shape.hxx>, which means it comes from OpenCASCADE directly. Then to really know what it does, you need to search OCCT documentation.
ShapeFix_Shape Class Reference
From here:
In your example:Prec – basic precision.
maxTol – maximum allowed tolerance. All problems will be detected for cases when a dimension of invalidity is larger than the basic precision or a tolerance of sub-shape on that problem is detected. The maximum tolerance value limits the increasing tolerance for fixing a problem such as fix of not connected and self-intersected wires. If a value larger than the maximum allowed tolerance is necessary for correcting a detected problem the problem can not be fixed. The maximal tolerance is not taking into account during computation of tolerance of edges in ShapeFix_SameParameter() method and ShapeFix_Edge::FixVertexTolerance() method. See Repairing tool for edges for details.
minTol – minimal allowed tolerance. It defines the minimal allowed length of edges. Detected edges having length less than the specified minimal tolerance will be removed if ModifyTopologyMode in Repairing tool for wires is set to true. See Repairing tool for wires for details.
Code: Select all
Prec = 0.1
minTol = 0
maxTol = 1
sh.fix(Prec, minTol, maxTol) # fixes self-intersecting wires