return anObj
## Create a wire from the set of edges and wires.
+ # To close a gap, enlarges wire tolerance.
+ #
# @param theEdgesAndWires List of edges and/or wires.
# @param theTolerance Maximum distance between vertices, that will be merged.
# Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
"""
Create a wire from the set of edges and wires.
+ To close a gap, enlarges wire tolerance.
Parameters:
theEdgesAndWires List of edges and/or wires.
New GEOM.GEOM_Object, containing the created wire.
"""
# Example: see GEOM_TestAll.py
- anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
+ anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance, GEOM.WBM_FixTolerance)
RaiseIfFailed("MakeWire", self.ShapesOp)
self._autoPublish(anObj, theName, "wire")
return anObj
+ ## Create a wire from the set of edges and wires.
+ # To close a gap, replaces curves, neighbour to the gap, with new curves
+ # of the same type and close parameters, connecting in the middle of the gap.
+ #
+ # @param theEdgesAndWires List of edges and/or wires.
+ # @param theTolerance Maximum distance between vertices, that will be merged.
+ # Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
+ # @param theName Object name; when specified, this parameter is used
+ # for result publication in the study. Otherwise, if automatic
+ # publication is switched on, default value is used for result name.
+ #
+ # @return New GEOM.GEOM_Object, containing the created wire.
+ #
+ # @ref tui_creation_wire "Example"
+ @ManageTransactions("ShapesOp")
+ def MakeWireConstCurveType(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
+ """
+ Create a wire from the set of edges and wires.
+ To close a gap, replaces curves, neighbour to the gap, with new curves
+ of the same type and close parameters, connecting in the middle of the gap.
+
+ Parameters:
+ theEdgesAndWires List of edges and/or wires.
+ theTolerance Maximum distance between vertices, that will be merged.
+ Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
+ theName Object name; when specified, this parameter is used
+ for result publication in the study. Otherwise, if automatic
+ publication is switched on, default value is used for result name.
+
+ Returns:
+ New GEOM.GEOM_Object, containing the created wire.
+ """
+ anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance, GEOM.WBM_KeepCurveType)
+ RaiseIfFailed("MakeWireConstCurveType", self.ShapesOp)
+ self._autoPublish(anObj, theName, "wire")
+ return anObj
+
+ ## Create a wire from the set of edges and wires.
+ # Possible gaps are closed according to theMode.
+ #
+ # @param theEdgesAndWires List of edges and/or wires.
+ # @param theTolerance Maximum distance between vertices, that will be merged.
+ # Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
+ # @param theMode GEOM.wire_build_mode Mode of gaps closing.
+ # Possible values are GEOM.WBM_FixTolerance, GEOM.WBM_KeepCurveType
+ # and GEOM.WBM_Approximation.
+ # @param theName Object name; when specified, this parameter is used
+ # for result publication in the study. Otherwise, if automatic
+ # publication is switched on, default value is used for result name.
+ #
+ # @return New GEOM.GEOM_Object, containing the created wire.
+ #
+ # @ref tui_creation_wire "Example"
+ @ManageTransactions("ShapesOp")
+ def MakeWireWithMode(self, theEdgesAndWires, theTolerance = 1e-07,
+ theMode = GEOM.WBM_Approximation, theName=None):
+ """
+ Create a wire from the set of edges and wires.
+ Possible gaps are closed according to theMode.
+
+ Parameters:
+ theEdgesAndWires List of edges and/or wires.
+ theTolerance Maximum distance between vertices, that will be merged.
+ Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
+ theMode GEOM.wire_build_mode Mode of gaps closing.
+ Possible values are GEOM.WBM_FixTolerance, GEOM.WBM_KeepCurveType
+ and GEOM.WBM_Approximation.
+ theName Object name; when specified, this parameter is used
+ for result publication in the study. Otherwise, if automatic
+ publication is switched on, default value is used for result name.
+
+ Returns:
+ New GEOM.GEOM_Object, containing the created wire.
+ """
+ anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance, theMode)
+ RaiseIfFailed("MakeWireWithMode", self.ShapesOp)
+ self._autoPublish(anObj, theName, "wire")
+ return anObj
+
## Create a face on the given wire.
# @param theWire closed Wire or Edge to build the face on.
# @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
self._autoPublish(anObj, theName, "face")
return anObj
+
+ ## Create a non-planar face from a list of closed edges and a list of vertices.
+ # @param theEdges list of Edges(must be closed but not nesessarily belong to the same plane).
+ # @param theVertices list of vertices through which the result face must pass.
+ # @param theTolerance tolerance
+ # @param theName Object name; when specified, this parameter is used
+ # for result publication in the study. Otherwise, if automatic
+ # publication is switched on, default value is used for result name.
+ #
+ # @return New GEOM.GEOM_Object, containing the created face.
+ #
+ # @ref tui_creation_face "Example"
+ @ManageTransactions("ShapesOp")
+ def MakeWrappedFace(self, theEdges, theVertices, theTolerance, theName=None):
+ """
+ Create a non-planar face from a list of closed edges and a list of vertices.
+
+ Parameters:
+ theEdges list of Edges(must be closed but not nesessarily belong to the same plane).
+ theVertices list of vertices through which the result face must pass.
+ theTolerance tolerance
+ theName Object name; when specified, this parameter is used
+ for result publication in the study. Otherwise, if automatic
+ publication is switched on, default value is used for result name.
+
+ Returns:
+ New GEOM.GEOM_Object, containing the created face.
+ """
+ # Example: see GEOM_TestAll.py
+ anObj = self.ShapesOp.MakeWrappedFace(theEdges, theVertices, theTolerance)
+ RaiseIfFailed("MakeWrappedFace", self.ShapesOp)
+ self._autoPublish(anObj, theName, "face")
+ return anObj
## Create a face from a set of edges with the given constraints.
# @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):