OCC.ShapeUpgrade module

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_ClosedEdgeDivide(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_EdgeDivide

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_ClosedFaceDivide(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_FaceDivide

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_ConvertCurve2dToBezier(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve2d

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_ConvertCurve3dToBezier(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve3d

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_ConvertSurfaceToBezierBasis(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitSurface

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_EdgeDivide(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_Tool

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_FaceDivide(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_Tool

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_FaceDivideArea(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_FaceDivide

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_FixSmallBezierCurves(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_FixSmallCurves

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_FixSmallCurves(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_Tool

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_RemoveInternalWires(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_Tool

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_RemoveLocations(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve2d(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve2dContinuity(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve2d

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve3d(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve3dContinuity(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitCurve3d

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitSurface(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitSurfaceAngle(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitSurface

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitSurfaceArea(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitSurface

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitSurfaceContinuity(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_SplitSurface

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_Tool(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_UnifySameDomain(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.Handle_ShapeUpgrade_WireDivide(*args)

Bases: OCC.ShapeUpgrade.Handle_ShapeUpgrade_Tool

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ClosedEdgeDivide

Bases: OCC.ShapeUpgrade.ShapeUpgrade_EdgeDivide

GetHandle()

ShapeUpgrade_ClosedEdgeDivide_GetHandle(ShapeUpgrade_ClosedEdgeDivide self) -> Handle_ShapeUpgrade_ClosedEdgeDivide

thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ClosedFaceDivide(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_FaceDivide

GetHandle()

ShapeUpgrade_ClosedFaceDivide_GetHandle(ShapeUpgrade_ClosedFaceDivide self) -> Handle_ShapeUpgrade_ClosedFaceDivide

GetNbSplitPoints()
  • Returns the number of splitting points
Return type:int
SetNbSplitPoints()
  • Sets the number of cutting lines by which closed face will be splitted. The resulting faces will be num+1.
Parameters:num (Standard_Integer) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ConvertCurve2dToBezier

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve2d

GetHandle()

ShapeUpgrade_ConvertCurve2dToBezier_GetHandle(ShapeUpgrade_ConvertCurve2dToBezier self) -> Handle_ShapeUpgrade_ConvertCurve2dToBezier

SplitParams()
  • Returns the list of splitted parameters in original curve parametrisation.
Return type:Handle_TColStd_HSequenceOfReal
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ConvertCurve3dToBezier

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve3d

GetCircleMode()
  • Returns the Geom_Circle conversion mode.
Return type:bool
GetConicMode()
  • Performs converting and computes the resulting shape.
Return type:bool
GetHandle()

ShapeUpgrade_ConvertCurve3dToBezier_GetHandle(ShapeUpgrade_ConvertCurve3dToBezier self) -> Handle_ShapeUpgrade_ConvertCurve3dToBezier

GetLineMode()
  • Returns the Geom_Line conversion mode.
Return type:bool
SetCircleMode()
  • Sets mode for conversion Geom_Circle to bezier.
Parameters:mode (bool) –
Return type:None
SetConicMode()
  • Returns the Geom_Conic conversion mode.
Parameters:mode (bool) –
Return type:None
SetLineMode()
  • Sets mode for conversion Geom_Line to bezier.
Parameters:mode (bool) –
Return type:None
SplitParams()
  • Returns the list of splitted parameters in original curve parametrisation.
Return type:Handle_TColStd_HSequenceOfReal
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ConvertSurfaceToBezierBasis

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitSurface

GetBSplineMode()
  • Returns the Geom_BSplineSurface conversion mode.
Return type:bool
GetExtrusionMode()
  • Returns the Geom_SurfaceOfLinearExtrusion conversion mode.
Return type:bool
GetHandle()

ShapeUpgrade_ConvertSurfaceToBezierBasis_GetHandle(ShapeUpgrade_ConvertSurfaceToBezierBasis self) -> Handle_ShapeUpgrade_ConvertSurfaceToBezierBasis

GetPlaneMode()
  • Returns the Geom_Pline conversion mode.
Return type:bool
GetRevolutionMode()
  • Returns the Geom_SurfaceOfRevolution conversion mode.
Return type:bool
Segments()
  • Returns the grid of bezier based surfaces correspondent to original surface.
Return type:Handle_ShapeExtend_CompositeSurface
SetBSplineMode()
  • Sets mode for conversion Geom_BSplineSurface to Bezier
Parameters:mode (bool) –
Return type:None
SetExtrusionMode()
  • Sets mode for conversion Geom_SurfaceOfLinearExtrusion to Bezier
Parameters:mode (bool) –
Return type:None
SetPlaneMode()
  • Sets mode for conversion Geom_Plane to Bezier
Parameters:mode (bool) –
Return type:None
SetRevolutionMode()
  • Sets mode for conversion Geom_SurfaceOfRevolution to Bezier
Parameters:mode (bool) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_EdgeDivide

Bases: OCC.ShapeUpgrade.ShapeUpgrade_Tool

Clear()
Return type:None
Compute()
Parameters:E (TopoDS_Edge &) –
Return type:bool
GetHandle()

ShapeUpgrade_EdgeDivide_GetHandle(ShapeUpgrade_EdgeDivide self) -> Handle_ShapeUpgrade_EdgeDivide

GetSplitCurve2dTool()
  • Returns the tool for splitting pcurves.
Return type:Handle_ShapeUpgrade_SplitCurve2d
GetSplitCurve3dTool()
  • Returns the tool for splitting 3D curves.
Return type:Handle_ShapeUpgrade_SplitCurve3d
HasCurve2d()
Return type:bool
HasCurve3d()
Return type:bool
Knots2d()
Return type:Handle_TColStd_HSequenceOfReal
Knots3d()
Return type:Handle_TColStd_HSequenceOfReal
SetFace()
  • Sets supporting surface by face
Parameters:F (TopoDS_Face &) –
Return type:None
SetSplitCurve2dTool()
  • Sets the tool for splitting pcurves.
Parameters:splitCurve2dTool (Handle_ShapeUpgrade_SplitCurve2d &) –
Return type:None
SetSplitCurve3dTool()
  • Sets the tool for splitting 3D curves.
Parameters:splitCurve3dTool (Handle_ShapeUpgrade_SplitCurve3d &) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_FaceDivide(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_Tool

GetHandle()

ShapeUpgrade_FaceDivide_GetHandle(ShapeUpgrade_FaceDivide self) -> Handle_ShapeUpgrade_FaceDivide

GetWireDivideTool()
  • Returns the tool for dividing edges on Face. This tool must be already initialized.
Return type:Handle_ShapeUpgrade_WireDivide
Init()
  • Initialize by a Face.
Parameters:F (TopoDS_Face &) –
Return type:None
Perform()
  • Performs splitting and computes the resulting shell The context is used to keep track of former splittings in order to keep sharings. It is updated according to modifications made.
Return type:bool
Result()
  • Gives the resulting Shell, or Face, or Null shape if not done.
Return type:TopoDS_Shape
SetSplitSurfaceTool()
  • Sets the tool for splitting surfaces.
Parameters:splitSurfaceTool (Handle_ShapeUpgrade_SplitSurface &) –
Return type:None
SetSurfaceSegmentMode()
  • Purpose sets mode for trimming (segment) surface by wire UV bounds.
Parameters:Segment (bool) –
Return type:None
SetWireDivideTool()
  • Sets the tool for dividing edges on Face.
Parameters:wireDivideTool (Handle_ShapeUpgrade_WireDivide &) –
Return type:None
SplitCurves()
  • Performs splitting of curves of all the edges in the shape and divides these edges.
Return type:bool
SplitSurface()
  • Performs splitting of surface and computes the shell from source face.
Return type:bool
Status()
  • Queries the status of last call to Perform OK : no splitting was done (or no call to Perform) DONE1: some edges were splitted DONE2: surface was splitted DONE3: surface was modified without splitting FAIL1: some fails encountered during splitting wires FAIL2: face cannot be splitted
Parameters:status (ShapeExtend_Status) –
Return type:bool
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_FaceDivideArea(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_FaceDivide

GetHandle()

ShapeUpgrade_FaceDivideArea_GetHandle(ShapeUpgrade_FaceDivideArea self) -> Handle_ShapeUpgrade_FaceDivideArea

GetMaxArea()

ShapeUpgrade_FaceDivideArea_GetMaxArea(ShapeUpgrade_FaceDivideArea self) -> Standard_Real

SetMaxArea()

ShapeUpgrade_FaceDivideArea_SetMaxArea(ShapeUpgrade_FaceDivideArea self, Standard_Real value)

thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_FixSmallBezierCurves

Bases: OCC.ShapeUpgrade.ShapeUpgrade_FixSmallCurves

GetHandle()

ShapeUpgrade_FixSmallBezierCurves_GetHandle(ShapeUpgrade_FixSmallBezierCurves self) -> Handle_ShapeUpgrade_FixSmallBezierCurves

thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_FixSmallCurves

Bases: OCC.ShapeUpgrade.ShapeUpgrade_Tool

Approx()
Parameters:
  • Curve3d (Handle_Geom_Curve &) –
  • Curve2d (Handle_Geom2d_Curve &) –
  • Curve2dR (Handle_Geom2d_Curve &) –
  • First (float &) –
  • Last (float &) –
Return type:

bool

GetHandle()

ShapeUpgrade_FixSmallCurves_GetHandle(ShapeUpgrade_FixSmallCurves self) -> Handle_ShapeUpgrade_FixSmallCurves

Init()
Parameters:
  • theEdge (TopoDS_Edge &) –
  • theFace (TopoDS_Face &) –
Return type:

None

SetSplitCurve2dTool()
  • Sets the tool for splitting pcurves.
Parameters:splitCurve2dTool (Handle_ShapeUpgrade_SplitCurve2d &) –
Return type:None
SetSplitCurve3dTool()
  • Sets the tool for splitting 3D curves.
Parameters:splitCurve3dTool (Handle_ShapeUpgrade_SplitCurve3d &) –
Return type:None
Status()
  • Queries the status of last call to Perform OK : DONE1: DONE2: FAIL1:
Parameters:status (ShapeExtend_Status) –
Return type:bool
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_RemoveInternalWires(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_Tool

GetHandle()

ShapeUpgrade_RemoveInternalWires_GetHandle(ShapeUpgrade_RemoveInternalWires self) -> Handle_ShapeUpgrade_RemoveInternalWires

GetMinArea()

ShapeUpgrade_RemoveInternalWires_GetMinArea(ShapeUpgrade_RemoveInternalWires self) -> Standard_Real

GetRemoveFaceMode()

ShapeUpgrade_RemoveInternalWires_GetRemoveFaceMode(ShapeUpgrade_RemoveInternalWires self) -> Standard_Boolean

GetResult()
  • //!Get result shape
Return type:TopoDS_Shape
Init()
  • Initialize by a Shape.
Parameters:theShape (TopoDS_Shape &) –
Return type:None
Perform()
  • //!Removes all internal wires having area less than area specified as minimal allowed area
Return type:bool
  • //!If specified sequence of shape contains - //! 1.wires then these wires will be removed if they have area less than allowed min area. 2.faces than internal wires from these faces will be removed if they have area less than allowed min area.
Parameters:theSeqShapes (TopTools_SequenceOfShape &) –
Return type:bool
RemovedFaces()
  • //!Returns sequence of removed faces.
Return type:TopTools_SequenceOfShape
RemovedWires()
  • //!Returns sequence of removed faces.
Return type:TopTools_SequenceOfShape
SetMinArea()

ShapeUpgrade_RemoveInternalWires_SetMinArea(ShapeUpgrade_RemoveInternalWires self, Standard_Real value)

SetRemoveFaceMode()

ShapeUpgrade_RemoveInternalWires_SetRemoveFaceMode(ShapeUpgrade_RemoveInternalWires self, Standard_Boolean value)

Status()
  • //!Queries status of last call to Perform() : OK - nothing was done :DONE1 - internal wires were removed :DONE2 - small faces were removed. :FAIL1 - initial shape is not specified :FAIL2 - specified sub-shape is not belonged to inotial shape.
Parameters:theStatus (ShapeExtend_Status) –
Return type:bool
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_RemoveLocations

Bases: OCC.MMgt.MMgt_TShared

GetHandle()

ShapeUpgrade_RemoveLocations_GetHandle(ShapeUpgrade_RemoveLocations self) -> Handle_ShapeUpgrade_RemoveLocations

GetResult()
  • //!Returns shape with removed locatins.
Return type:TopoDS_Shape
ModifiedShape()
  • Returns modified shape obtained from initial shape.
Parameters:theInitShape (TopoDS_Shape &) –
Return type:TopoDS_Shape
Remove()
  • //!Removes all location correspodingly to RemoveLevel.
Parameters:theShape (TopoDS_Shape &) –
Return type:bool
RemoveLevel()
  • //!sets level starting with that location will be removed.Value of level can be set to TopAbs_SHAPE,TopAbs_COMPOUND,TopAbs_SOLID,TopAbs_SHELL,TopAbs_FACE.By default TopAbs_SHAPE. In this case location will be removed for all shape types for exception of compound.
Return type:TopAbs_ShapeEnum
SetRemoveLevel()
  • //!sets level starting with that location will be removed, by default TopAbs_SHAPE. In this case locations will be kept for specified shape and if specified shape is TopAbs_COMPOUND for sub-shapes of first level.
Parameters:theLevel (TopAbs_ShapeEnum) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ShapeConvertToBezier(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivide

Get2dConversion()
  • Returns the 2D conversion mode.
Return type:bool
Get3dCircleConversion()
  • Returns the Geom_Circle conversion mode.
Return type:bool
Get3dConicConversion()
  • Returns the Geom_Conic conversion mode.
Return type:bool
Get3dConversion()
  • Returns the 3D conversion mode.
Return type:bool
Get3dLineConversion()
  • Returns the Geom_Line conversion mode.
Return type:bool
GetBSplineMode()
  • Returns the Geom_BSplineSurface conversion mode.
Return type:bool
GetExtrusionMode()
  • Returns the Geom_SurfaceOfLinearExtrusion conversion mode.
Return type:bool
GetPlaneMode()
  • Returns the Geom_Pline conversion mode.
Return type:bool
GetRevolutionMode()
  • Returns the Geom_SurfaceOfRevolution conversion mode.
Return type:bool
GetSurfaceConversion()
  • Returns the surface conversion mode.
Return type:bool
Perform()
  • Performs converting and computes the resulting shape
Parameters:newContext (bool) – default value is Standard_True
Return type:bool
  • Performs converting and computes the resulting shape
Parameters:newContext (bool) – default value is Standard_True
Return type:bool
Set2dConversion()
  • Sets mode for conversion 2D curves to bezier.
Parameters:mode (bool) –
Return type:None
Set3dCircleConversion()
  • Sets mode for conversion Geom_Circle to bezier.
Parameters:mode (bool) –
Return type:None
Set3dConicConversion()
  • Sets mode for conversion Geom_Conic to bezier.
Parameters:mode (bool) –
Return type:None
Set3dConversion()
  • Sets mode for conversion 3d curves to bezier.
Parameters:mode (bool) –
Return type:None
Set3dLineConversion()
  • Sets mode for conversion Geom_Line to bezier.
Parameters:mode (bool) –
Return type:None
SetBSplineMode()
  • Sets mode for conversion Geom_BSplineSurface to Bezier
Parameters:mode (bool) –
Return type:None
SetExtrusionMode()
  • Sets mode for conversion Geom_SurfaceOfLinearExtrusion to Bezier
Parameters:mode (bool) –
Return type:None
SetPlaneMode()
  • Sets mode for conversion Geom_Plane to Bezier
Parameters:mode (bool) –
Return type:None
SetRevolutionMode()
  • Sets mode for conversion Geom_SurfaceOfRevolution to Bezier
Parameters:mode (bool) –
Return type:None
SetSurfaceConversion()
  • Sets mode for conversion surfaces curves to bezier basis.
Parameters:mode (bool) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivide(*args)

Bases: object

Delete()
Return type:void
GetContext()
  • Returns context with all the modifications made during last call(s) to Perform() recorded
Return type:Handle_ShapeBuild_ReShape
Init()
  • Initialize by a Shape.
Parameters:S (TopoDS_Shape &) –
Return type:None
Perform()
  • Performs splitting and computes the resulting shape If newContext is True (default), the internal context will be cleared at start, else previous substitutions will be acting.
Parameters:newContext (bool) – default value is Standard_True
Return type:bool
  • Performs splitting and computes the resulting shape If newContext is True (default), the internal context will be cleared at start, else previous substitutions will be acting.
Parameters:newContext (bool) – default value is Standard_True
Return type:bool
Result()
  • Gives the resulting Shape, or Null shape if not done.
Return type:TopoDS_Shape
SetContext()
  • Sets context with recorded modifications to be applied during next call(s) to Perform(shape,Standard_False)
Parameters:context (Handle_ShapeBuild_ReShape &) –
Return type:None
SetEdgeMode()
  • //!Sets mode for splitting 3d curves from edges. 0 - only curve 3d from free edges. 1 - only curve 3d from shared edges. 2 - all curve 3d.
Parameters:aEdgeMode (Standard_Integer) –
Return type:None
SetMaxTolerance()
  • Sets maximal allowed tolerance
Parameters:maxtol (float) –
Return type:None
SetMinTolerance()
  • Sets minimal allowed tolerance
Parameters:mintol (float) –
Return type:None
SetPrecision()
  • Defines the spatial precision used for splitting
Parameters:Prec (float) –
Return type:None
SetSplitFaceTool()
  • Sets the tool for splitting faces.
Parameters:splitFaceTool (Handle_ShapeUpgrade_FaceDivide &) –
Return type:None
SetSurfaceSegmentMode()
  • Purpose sets mode for trimming (segment) surface by wire UV bounds.
Parameters:Segment (bool) –
Return type:None
Status()
  • Queries the status of last call to Perform OK : no splitting was done (or no call to Perform) DONE1: some edges were splitted DONE2: surface was splitted FAIL1: some errors occured
Parameters:status (ShapeExtend_Status) –
Return type:bool
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivideAngle(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivide

InitTool()
  • Resets tool for splitting face with given angle
Parameters:MaxAngle (float) –
Return type:None
MaxAngle()
  • Returns maximal angle
Return type:float
SetMaxAngle()
  • Set maximal angle (calls InitTool)
Parameters:MaxAngle (float) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivideArea(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivide

GetMaxArea()

ShapeUpgrade_ShapeDivideArea_GetMaxArea(ShapeUpgrade_ShapeDivideArea self) -> Standard_Real

SetMaxArea()

ShapeUpgrade_ShapeDivideArea_SetMaxArea(ShapeUpgrade_ShapeDivideArea self, Standard_Real value)

thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivideClosed(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivide

SetNbSplitPoints()
  • Sets the number of cuts applied to divide closed faces. The number of resulting faces will be num+1.
Parameters:num (Standard_Integer) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivideClosedEdges(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivide

SetNbSplitPoints()
  • Sets the number of cuts applied to divide closed edges. The number of resulting faces will be num+1.
Parameters:num (Standard_Integer) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivideContinuity(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_ShapeDivide

SetBoundaryCriterion()
  • Defines a criterion of continuity for the boundary (all the Wires) The possible values are C0, G1, C1, G2, C2, C3, CN The default is C1 to respect the Cas.Cade Shape Validity. G1 and G2 are not authorized.
Parameters:Criterion (GeomAbs_Shape) – default value is GeomAbs_C1
Return type:None
  • Defines a criterion of continuity for the boundary (all the Wires) The possible values are C0, G1, C1, G2, C2, C3, CN The default is C1 to respect the Cas.Cade Shape Validity. G1 and G2 are not authorized.
Parameters:Criterion (GeomAbs_Shape) – default value is GeomAbs_C1
Return type:None
SetPCurveCriterion()
  • Defines a criterion of continuity for the boundary (all the pcurves of Wires) The possible values are C0, G1, C1, G2, C2, C3, CN The default is C1 to respect the Cas.Cade Shape Validity. G1 and G2 are not authorized.
Parameters:Criterion (GeomAbs_Shape) – default value is GeomAbs_C1
Return type:None
  • Defines a criterion of continuity for the boundary (all the pcurves of Wires) The possible values are C0, G1, C1, G2, C2, C3, CN The default is C1 to respect the Cas.Cade Shape Validity. G1 and G2 are not authorized.
Parameters:Criterion (GeomAbs_Shape) – default value is GeomAbs_C1
Return type:None
SetSurfaceCriterion()
  • Defines a criterion of continuity for the boundary (all the Wires) The possible values are C0, G1, C1, G2, C2, C3, CN The default is C1 to respect the Cas.Cade Shape Validity. G1 and G2 are not authorized.
Parameters:Criterion (GeomAbs_Shape) – default value is GeomAbs_C1
Return type:None
  • Defines a criterion of continuity for the boundary (all the Wires) The possible values are C0, G1, C1, G2, C2, C3, CN The default is C1 to respect the Cas.Cade Shape Validity. G1 and G2 are not authorized.
Parameters:Criterion (GeomAbs_Shape) – default value is GeomAbs_C1
Return type:None
SetTolerance()
  • Sets tolerance.
Parameters:Tol (float) –
Return type:None
SetTolerance2d()
  • Sets tolerance.
Parameters:Tol (float) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_ShellSewing

Bases: object

ApplySewing()
  • Builds a new shape from a former one, by calling Sewing from BRepOffsetAPI. Rebuilt solids are oriented to be ‘not infinite’ If <tol> is not given (i.e. value 0. by default), it is computed as the mean tolerance recorded in <shape> If no shell has been sewed, this method returns the input shape
Parameters:
  • shape (TopoDS_Shape &) –
  • tol (float) – default value is 0.0
Return type:

TopoDS_Shape

  • Builds a new shape from a former one, by calling Sewing from BRepOffsetAPI. Rebuilt solids are oriented to be ‘not infinite’ If <tol> is not given (i.e. value 0. by default), it is computed as the mean tolerance recorded in <shape> If no shell has been sewed, this method returns the input shape
Parameters:
  • shape (TopoDS_Shape &) –
  • tol (float) – default value is 0.0
Return type:

TopoDS_Shape

thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve

Bases: OCC.MMgt.MMgt_TShared

Build()
  • If Segment is True, the result is composed with segments of the curve bounded by the SplitValues. If Segment is False, the result is composed with trimmed Curves all based on the same complete curve.
Parameters:Segment (bool) –
Return type:void
Compute()
  • Calculates points for correction/splitting of the curve
Return type:void
GetHandle()

ShapeUpgrade_SplitCurve_GetHandle(ShapeUpgrade_SplitCurve self) -> Handle_ShapeUpgrade_SplitCurve

Init()
  • Initializes with curve first and last parameters.
Parameters:
  • First (float) –
  • Last (float) –
Return type:

None

Perform()
  • Performs correction/splitting of the curve. First defines splitting values by method Compute(), then calls method Build().
Parameters:Segment (bool) – default value is Standard_True
Return type:None
  • Performs correction/splitting of the curve. First defines splitting values by method Compute(), then calls method Build().
Parameters:Segment (bool) – default value is Standard_True
Return type:None
SetSplitValues()
  • Sets the parameters where splitting has to be done.
Parameters:SplitValues (Handle_TColStd_HSequenceOfReal &) –
Return type:None
SplitValues()
  • returns all the splitting values including the First and Last parameters of the input curve Merges input split values and new ones into myGlobalKnots
Return type:Handle_TColStd_HSequenceOfReal
Status()
  • Returns the status OK - no splitting is needed DONE1 - splitting required and gives more than one segment DONE2 - splitting is required, but gives only one segment (initial) DONE3 - geometric form of the curve or parametrisation is modified
Parameters:status (ShapeExtend_Status) –
Return type:bool
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve2d

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve

GetCurves()
Return type:Handle_TColGeom2d_HArray1OfCurve
GetHandle()

ShapeUpgrade_SplitCurve2d_GetHandle(ShapeUpgrade_SplitCurve2d self) -> Handle_ShapeUpgrade_SplitCurve2d

Init()
  • Initializes with pcurve with its first and last parameters.
Parameters:C (Handle_Geom2d_Curve &) –
Return type:None
  • Initializes with pcurve with its parameters.
Parameters:
  • C (Handle_Geom2d_Curve &) –
  • First (float) –
  • Last (float) –
Return type:

None

thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve2dContinuity

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve2d

GetHandle()

ShapeUpgrade_SplitCurve2dContinuity_GetHandle(ShapeUpgrade_SplitCurve2dContinuity self) -> Handle_ShapeUpgrade_SplitCurve2dContinuity

SetCriterion()
  • Sets criterion for splitting.
Parameters:Criterion (GeomAbs_Shape) –
Return type:None
SetTolerance()
  • Sets tolerance.
Parameters:Tol (float) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve3d

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve

GetCurves()
Return type:Handle_TColGeom_HArray1OfCurve
GetHandle()

ShapeUpgrade_SplitCurve3d_GetHandle(ShapeUpgrade_SplitCurve3d self) -> Handle_ShapeUpgrade_SplitCurve3d

Init()
  • Initializes with curve with its first and last parameters.
Parameters:C (Handle_Geom_Curve &) –
Return type:None
  • Initializes with curve with its parameters.
Parameters:
  • C (Handle_Geom_Curve &) –
  • First (float) –
  • Last (float) –
Return type:

None

thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve3dContinuity

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitCurve3d

GetCurve()
Return type:Handle_Geom_Curve
GetHandle()

ShapeUpgrade_SplitCurve3dContinuity_GetHandle(ShapeUpgrade_SplitCurve3dContinuity self) -> Handle_ShapeUpgrade_SplitCurve3dContinuity

SetCriterion()
  • Sets criterion for splitting.
Parameters:Criterion (GeomAbs_Shape) –
Return type:None
SetTolerance()
  • Sets tolerance.
Parameters:Tol (float) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_SplitSurface

Bases: OCC.MMgt.MMgt_TShared

Build()
  • Performs splitting of the supporting surface. If resulting surface is B-Spline and Segment is True, the result is composed with segments of the surface bounded by the U and V SplitValues (method Geom_BSplineSurface::Segment is used). If Segment is False, the result is composed with Geom_RectangularTrimmedSurface all based on the same complete surface. Fields myNbResultingRow and myNbResultingCol must be set to specify the size of resulting grid of surfaces.
Parameters:Segment (bool) –
Return type:void
Compute()
  • Calculates points for correction/splitting of the surface.
Parameters:Segment (bool) – default value is Standard_True
Return type:void
  • Calculates points for correction/splitting of the surface.
Parameters:Segment (bool) – default value is Standard_True
Return type:void
GetHandle()

ShapeUpgrade_SplitSurface_GetHandle(ShapeUpgrade_SplitSurface self) -> Handle_ShapeUpgrade_SplitSurface

Init()
  • Initializes with single supporting surface.
Parameters:S (Handle_Geom_Surface &) –
Return type:None
  • Initializes with single supporting surface with bounding parameters.
Parameters:
  • S (Handle_Geom_Surface &) –
  • UFirst (float) –
  • ULast (float) –
  • VFirst (float) –
  • VLast (float) –
Return type:

None

Perform()
  • Performs correction/splitting of the surface. First defines splitting values by method Compute(), then calls method Build().
Parameters:Segment (bool) – default value is Standard_True
Return type:None
  • Performs correction/splitting of the surface. First defines splitting values by method Compute(), then calls method Build().
Parameters:Segment (bool) – default value is Standard_True
Return type:None
ResSurfaces()
  • Returns obtained surfaces after splitting as CompositeSurface
Return type:Handle_ShapeExtend_CompositeSurface
SetUSplitValues()
  • Sets U parameters where splitting has to be done
Parameters:UValues (Handle_TColStd_HSequenceOfReal &) –
Return type:None
SetVSplitValues()
  • Sets V parameters where splitting has to be done
Parameters:VValues (Handle_TColStd_HSequenceOfReal &) –
Return type:None
Status()
  • Returns the status OK - no splitting is needed DONE1 - splitting required and gives more than one patch DONE2 - splitting is required, but gives only single patch (initial) DONE3 - geometric form of the surface or parametrisation is modified
Parameters:status (ShapeExtend_Status) –
Return type:bool
USplitValues()
  • returns all the U splitting values including the First and Last parameters of the input surface
Return type:Handle_TColStd_HSequenceOfReal
VSplitValues()
  • returns all the splitting V values including the First and Last parameters of the input surface
Return type:Handle_TColStd_HSequenceOfReal
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_SplitSurfaceAngle(*args)

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitSurface

GetHandle()

ShapeUpgrade_SplitSurfaceAngle_GetHandle(ShapeUpgrade_SplitSurfaceAngle self) -> Handle_ShapeUpgrade_SplitSurfaceAngle

MaxAngle()
  • Returns maximal angle
Return type:float
SetMaxAngle()
  • Set maximal angle
Parameters:MaxAngle (float) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_SplitSurfaceArea

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitSurface

Compute()
Parameters:
  • Segment (bool) – default value is Standard_True
  • Segment – default value is Standard_True
Return type:

void

Return type:

void

GetHandle()

ShapeUpgrade_SplitSurfaceArea_GetHandle(ShapeUpgrade_SplitSurfaceArea self) -> Handle_ShapeUpgrade_SplitSurfaceArea

GetNbParts()

ShapeUpgrade_SplitSurfaceArea_GetNbParts(ShapeUpgrade_SplitSurfaceArea self) -> Standard_Integer

SetNbParts()

ShapeUpgrade_SplitSurfaceArea_SetNbParts(ShapeUpgrade_SplitSurfaceArea self, Standard_Integer value)

thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_SplitSurfaceContinuity

Bases: OCC.ShapeUpgrade.ShapeUpgrade_SplitSurface

GetHandle()

ShapeUpgrade_SplitSurfaceContinuity_GetHandle(ShapeUpgrade_SplitSurfaceContinuity self) -> Handle_ShapeUpgrade_SplitSurfaceContinuity

SetCriterion()
  • Sets criterion for splitting.
Parameters:Criterion (GeomAbs_Shape) –
Return type:None
SetTolerance()
  • Sets tolerance.
Parameters:Tol (float) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_Tool

Bases: OCC.MMgt.MMgt_TShared

Context()
  • Returns context
Return type:Handle_ShapeBuild_ReShape
GetHandle()

ShapeUpgrade_Tool_GetHandle(ShapeUpgrade_Tool self) -> Handle_ShapeUpgrade_Tool

LimitTolerance()
  • Returns tolerance limited by [myMinTol,myMaxTol]
Parameters:toler (float) –
Return type:float
MaxTolerance()
  • Returns maximal allowed tolerance
Return type:float
MinTolerance()
  • Returns minimal allowed tolerance
Return type:float
Precision()
  • Returns basic precision value
Return type:float
Set()
  • Copy all fields from another Root object
Parameters:tool (Handle_ShapeUpgrade_Tool &) –
Return type:None
SetContext()
  • Sets context
Parameters:context (Handle_ShapeBuild_ReShape &) –
Return type:None
SetMaxTolerance()
  • Sets maximal allowed tolerance
Parameters:maxtol (float) –
Return type:None
SetMinTolerance()
  • Sets minimal allowed tolerance
Parameters:mintol (float) –
Return type:None
SetPrecision()
  • Sets basic precision value
Parameters:preci (float) –
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_UnifySameDomain(*args)

Bases: OCC.MMgt.MMgt_TShared

Build()
  • Builds the resulting shape
Return type:None
Generated()
Parameters:aShape (TopoDS_Shape &) –
Return type:TopoDS_Shape
GetHandle()

ShapeUpgrade_UnifySameDomain_GetHandle(ShapeUpgrade_UnifySameDomain self) -> Handle_ShapeUpgrade_UnifySameDomain

Initialize()
Parameters:
  • aShape (TopoDS_Shape &) –
  • UnifyEdges (bool) – default value is Standard_True
  • UnifyFaces (bool) – default value is Standard_True
  • ConcatBSplines (bool) – default value is Standard_False
  • aShape
  • UnifyEdges – default value is Standard_True
  • UnifyFaces – default value is Standard_True
  • ConcatBSplines – default value is Standard_False
  • aShape
  • UnifyEdges – default value is Standard_True
  • UnifyFaces – default value is Standard_True
  • ConcatBSplines – default value is Standard_False
  • aShape
  • UnifyEdges – default value is Standard_True
  • UnifyFaces – default value is Standard_True
  • ConcatBSplines – default value is Standard_False
Return type:

None

Return type:

None

Return type:

None

Return type:

None

Shape()
  • Gives the resulting shape
Return type:TopoDS_Shape
UnifyEdges()
  • this method makes if possible a common edge from each group of edges connecting common couple of faces
Return type:None
UnifyFaces()
  • this method makes if possible a common face from each group of faces lying on coincident surfaces
Return type:None
UnifyFacesAndEdges()
  • this method unifies same domain faces and edges
Return type:None
thisown

The membership flag

class OCC.ShapeUpgrade.ShapeUpgrade_WireDivide

Bases: OCC.ShapeUpgrade.ShapeUpgrade_Tool

GetEdgeDivideTool()
  • returns tool for splitting edges
Return type:Handle_ShapeUpgrade_EdgeDivide
GetFixSmallCurveTool()
  • //!Returns tool for fixing small curves
Return type:Handle_ShapeUpgrade_FixSmallCurves
GetHandle()

ShapeUpgrade_WireDivide_GetHandle(ShapeUpgrade_WireDivide self) -> Handle_ShapeUpgrade_WireDivide

GetTransferParamTool()
  • Returns the tool for Transfer of parameters.
Return type:Handle_ShapeAnalysis_TransferParameters
Init()
  • Initializes by wire and face
Parameters:
  • W (TopoDS_Wire &) –
  • F (TopoDS_Face &) –
Return type:

None

  • Initializes by wire and surface
Parameters:
  • W (TopoDS_Wire &) –
  • S (Handle_Geom_Surface &) –
Return type:

None

Load()
  • Loads working wire
Parameters:W (TopoDS_Wire &) –
Return type:None
  • Creates wire of one edge and calls Load for wire
Parameters:E (TopoDS_Edge &) –
Return type:None
Perform()
  • Computes the resulting wire by splitting all the edges according to splitting criteria. All the modifications made are recorded in context (ShapeBuild_ReShape). This tool is applied to all edges before splitting them in order to keep sharings. If no supporting face or surface is defined, only 3d splitting criteria are used.
Return type:void
SetEdgeDivideTool()
  • Sets tool for splitting edge
Parameters:edgeDivideTool (Handle_ShapeUpgrade_EdgeDivide &) –
Return type:None
SetEdgeMode()
  • //!Sets mode for splitting 3d curves from edges. 0 - only curve 3d from free edges. 1 - only curve 3d from shared edges. 2 - all curve 3d.
Parameters:EdgeMode (Standard_Integer) –
Return type:None
SetFace()
  • Sets supporting surface by face
Parameters:F (TopoDS_Face &) –
Return type:None
SetFixSmallCurveTool()
  • //!Sets tool for fixing small curves with specified min tolerance;
Parameters:FixSmallCurvesTool (Handle_ShapeUpgrade_FixSmallCurves &) –
Return type:None
SetSplitCurve2dTool()
  • Sets the tool for splitting pcurves.
Parameters:splitCurve2dTool (Handle_ShapeUpgrade_SplitCurve2d &) –
Return type:None
SetSplitCurve3dTool()
  • Sets the tool for splitting 3D curves.
Parameters:splitCurve3dTool (Handle_ShapeUpgrade_SplitCurve3d &) –
Return type:None
SetSurface()
  • Sets supporting surface
Parameters:S (Handle_Geom_Surface &) –
Return type:None
  • Sets supporting surface with location
Parameters:
  • S (Handle_Geom_Surface &) –
  • L (TopLoc_Location &) –
Return type:

None

SetTransferParamTool()
  • Sets the tool for Transfer parameters between curves and pcurves.
Parameters:TransferParam (Handle_ShapeAnalysis_TransferParameters &) –
Return type:None
Status()
  • Queries status of last call to Perform() OK - no edges were splitted, wire left untouched DONE1 - some edges were splitted FAIL1 - some edges have no 3d curve (skipped) FAIL2 - some edges have no pcurve (skipped)
Parameters:status (ShapeExtend_Status) –
Return type:bool
Wire()
  • Gives the resulting Wire (equal to initial one if not done or Null if not loaded)
Return type:TopoDS_Wire
thisown

The membership flag

class OCC.ShapeUpgrade.SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
thisown

The membership flag

value()
class OCC.ShapeUpgrade.shapeupgrade(*args, **kwargs)

Bases: object

static C0BSplineToSequenceOfC1BSplineCurve(*args)
  • Unifies same domain faces and edges of specified shape
Parameters:
  • BS (Handle_Geom_BSplineCurve &) –
  • seqBS (Handle_TColGeom_HSequenceOfBoundedCurve &) –
Return type:

bool

  • Converts C0 B-Spline curve into sequence of C1 B-Spline curves. This method splits B-Spline at the knots with multiplicities equal to degree, i.e. unlike method GeomConvert::C0BSplineToArrayOfC1BSplineCurve this one does not use any tolerance and therefore does not change the geometry of B-Spline. Returns True if C0 B-Spline was successfully splitted, else returns False (if BS is C1 B-Spline).
Parameters:
  • BS (Handle_Geom2d_BSplineCurve &) –
  • seqBS (Handle_TColGeom2d_HSequenceOfBoundedCurve &) –
Return type:

bool

thisown

The membership flag

OCC.ShapeUpgrade.shapeupgrade_C0BSplineToSequenceOfC1BSplineCurve(*args)
  • Unifies same domain faces and edges of specified shape
Parameters:
  • BS (Handle_Geom_BSplineCurve &) –
  • seqBS (Handle_TColGeom_HSequenceOfBoundedCurve &) –
Return type:

bool

  • Converts C0 B-Spline curve into sequence of C1 B-Spline curves. This method splits B-Spline at the knots with multiplicities equal to degree, i.e. unlike method GeomConvert::C0BSplineToArrayOfC1BSplineCurve this one does not use any tolerance and therefore does not change the geometry of B-Spline. Returns True if C0 B-Spline was successfully splitted, else returns False (if BS is C1 B-Spline).
Parameters:
  • BS (Handle_Geom2d_BSplineCurve &) –
  • seqBS (Handle_TColGeom2d_HSequenceOfBoundedCurve &) –
Return type:

bool