X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBLSURFPlugin%2FBLSURFPluginBuilder.py;h=8fcb6e959f06c583b2db517920f118b91b07c6ee;hb=refs%2Fheads%2Fgpusph_v2;hp=7eb158f830b3633b871d1dca7b8708d80b89b7b2;hpb=ac0ed6b0fef55e276593e4c7afc4a4ba999cd82a;p=plugins%2Fblsurfplugin.git diff --git a/src/BLSURFPlugin/BLSURFPluginBuilder.py b/src/BLSURFPlugin/BLSURFPluginBuilder.py index 7eb158f..8fcb6e9 100644 --- a/src/BLSURFPlugin/BLSURFPluginBuilder.py +++ b/src/BLSURFPlugin/BLSURFPluginBuilder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2014 CEA/DEN, EDF R&D +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -19,18 +19,21 @@ ## # @package BLSURFPluginBuilder -# Python API for the BLSURF meshing plug-in module. +# Python API for the MG-CADSurf meshing plug-in module. from salome.smesh.smesh_algorithm import Mesh_Algorithm +import GEOM -# Topology treatment way of BLSURF +LIBRARY = "libBLSURFEngine.so" + +# Topology treatment way of MG-CADSurf FromCAD, PreProcess, PreProcessPlus, PreCAD = 0,1,2,3 -# Element size flag of BLSURF -DefaultSize, DefaultGeom, BLSURF_GlobalSize, BLSURF_LocalSize = 0,0,1,2 +# Element size flag of MG-CADSurf +DefaultSize, DefaultGeom, MG_CADSURF_GlobalSize, MG_CADSURF_LocalSize = 0,0,1,2 # Retrocompatibility -BLSURF_Custom, SizeMap = BLSURF_GlobalSize, BLSURF_LocalSize - +MG_CADSURF_Custom, SizeMap = MG_CADSURF_GlobalSize, MG_CADSURF_LocalSize +BLSURF_Custom, BLSURF_GlobalSize, BLSURF_LocalSize = MG_CADSURF_Custom, MG_CADSURF_GlobalSize, MG_CADSURF_LocalSize # import BLSURFPlugin module if possible noBLSURFPlugin = 0 @@ -52,9 +55,9 @@ BLSURF = MG_CADSurf # Algorithms #---------------------- -## BLSurf 2D algorithm. +## MG-CADSurf 2D algorithm. # -# It can be created by calling smeshBuilder.Mesh.Triangle(smeshBuilder.BLSURF,geom=0) +# It can be created by calling smeshBuilder.Mesh.Triangle(smeshBuilder.MG-CADSurf,geom=0) # class BLSURF_Algorithm(Mesh_Algorithm): @@ -63,7 +66,7 @@ class BLSURF_Algorithm(Mesh_Algorithm): meshMethod = "Triangle" ## type of algorithm used with helper function in smeshBuilder.Mesh class # @internal - algoType = BLSURF + algoType = MG_CADSurf ## doc string of the method # @internal docHelper = "Creates triangle algorithm for faces" @@ -72,6 +75,7 @@ class BLSURF_Algorithm(Mesh_Algorithm): _bad_surface_element_aspect_ratio = 1000 _geometric_approximation = 22 _gradation = 1.3 + _volume_gradation = 2 _metric = "isotropic" _remove_tiny_edges = 0 @@ -83,29 +87,33 @@ class BLSURF_Algorithm(Mesh_Algorithm): Mesh_Algorithm.__init__(self) if noBLSURFPlugin: print "Warning: BLSURFPlugin module unavailable" - self.Create(mesh, geom, BLSURF, "libBLSURFEngine.so") + if mesh.GetMesh().HasShapeToMesh(): + self.Create(mesh, geom, self.algoType, LIBRARY) + else: + self.Create(mesh, geom, self.algoType+"_NOGEOM", LIBRARY) + mesh.smeshpyD.SetName( self.algo, self.algoType ) self.params=None self.geompyD = mesh.geompyD #self.SetPhysicalMesh() - PAL19680 pass ## Sets a way to define size of mesh elements to generate. - # @param thePhysicalMesh is: DefaultSize, BLSURF_Custom or SizeMap. + # @param thePhysicalMesh is: DefaultSize, MG_CADSURF_Custom or SizeMap. def SetPhysicalMesh(self, thePhysicalMesh=DefaultSize): physical_size_mode = thePhysicalMesh if self.Parameters().GetGeometricMesh() == DefaultGeom: if physical_size_mode == DefaultSize: - physical_size_mode = BLSURF_GlobalSize + physical_size_mode = MG_CADSURF_GlobalSize self.Parameters().SetPhysicalMesh(physical_size_mode) pass ## Sets a way to define maximum angular deflection of mesh from CAD model. - # @param theGeometricMesh is: DefaultGeom (0)) or BLSURF_GlobalSize (1)) + # @param theGeometricMesh is: DefaultGeom (0)) or MG_CADSURF_GlobalSize (1)) def SetGeometricMesh(self, theGeometricMesh=DefaultGeom): geometric_size_mode = theGeometricMesh if self.Parameters().GetPhysicalMesh() == DefaultSize: if geometric_size_mode == DefaultGeom: - geometric_size_mode = BLSURF_GlobalSize + geometric_size_mode = MG_CADSURF_GlobalSize self.Parameters().SetGeometricMesh(geometric_size_mode) pass @@ -114,7 +122,7 @@ class BLSURF_Algorithm(Mesh_Algorithm): # @param isRelative : if True, the value is relative to the length of the diagonal of the bounding box def SetPhySize(self, theVal, isRelative = False): if self.Parameters().GetPhysicalMesh() == DefaultSize: - self.SetPhysicalMesh(BLSURF_GlobalSize) + self.SetPhysicalMesh(MG_CADSURF_GlobalSize) if isRelative: self.Parameters().SetPhySizeRel(theVal) else: @@ -145,24 +153,43 @@ class BLSURF_Algorithm(Mesh_Algorithm): # @param theVal value of angular deflection def SetAngleMesh(self, theVal=_geometric_approximation): if self.Parameters().GetGeometricMesh() == DefaultGeom: - self.SetGeometricMesh(BLSURF_GlobalSize) + self.SetGeometricMesh(MG_CADSURF_GlobalSize) self.Parameters().SetAngleMesh(theVal) pass + ## Sets the maximum desired distance between a triangle and its supporting CAD surface + # @param distance the distance between a triangle and a surface + def SetChordalError(self, distance): + self.Parameters().SetChordalError(distance) + pass + ## Sets maximal allowed ratio between the lengths of two adjacent edges. + # @param toUseGradation to use gradation # @param theVal value of maximal length ratio - def SetGradation(self, theVal=_gradation): + def SetGradation(self, toUseGradation=True, theVal=_gradation): + if isinstance( toUseGradation, float ): ## backward compatibility + toUseGradation, theVal = True, toUseGradation if self.Parameters().GetGeometricMesh() == 0: theVal = self._gradation + self.Parameters().SetUseGradation(toUseGradation) self.Parameters().SetGradation(theVal) pass + ## Sets maximal allowed ratio between the lengths of two adjacent edges in 3D mesh. + # @param toUseGradation to use gradation + # @param theVal value of maximal length ratio + def SetVolumeGradation(self, toUseGradation=True, theVal=_gradation): + if self.Parameters().GetGeometricMesh() == 0: theVal = self._volume_gradation + self.Parameters().SetUseVolumeGradation(toUseGradation) + self.Parameters().SetVolumeGradation(theVal) + pass + ## Sets topology usage way. # @param way defines how mesh conformity is assured def SetTopology(self, way): - if way != PreCAD: + if way != PreCAD and way != FromCAD: print "Warning: topology mode %d is no longer supported. Mode FromCAD is used."%way way = FromCAD self.Parameters().SetTopology(way) @@ -183,19 +210,156 @@ class BLSURF_Algorithm(Mesh_Algorithm): self.Parameters().SetVerbosity(level) pass + ## Set enforce_cad_edge_sizes parameter + # + # Relaxes the given sizemap constraint around CAD edges to allow a better + # element quality and a better geometric approximation. It is only useful in + # combination with the gradation option. + # + def SetEnforceCadEdgesSize( self, toEnforce ): + self.Parameters().SetEnforceCadEdgesSize( toEnforce ) + + ## Set jacobian_rectification_respect_geometry parameter + # + # While making the mesh quadratic, allows to lose the CAD-mesh associativity in order + # to correct elements with nagative Jacobian + # + def SetJacobianRectificationRespectGeometry( self, allowRectification ): + self.Parameters().SetJacobianRectificationRespectGeometry( allowRectification ) + + ## Set rectify_jacobian parameter + # + # While making the mesh quadratic, allow to fix nagative Jacobian surface elements + # + def SetJacobianRectification( self, allowRectification ): + self.Parameters().SetJacobianRectification( allowRectification ) + + ## Set respect_geometry parameter + # + # This patch independent option can be deactivated to allow MeshGems-CADSurf + # to lower the geometry accuracy in its patch independent process. + # + def SetRespectGeometry( self, toRespect ): + self.Parameters().SetRespectGeometry( toRespect ) + + ## Set max_number_of_points_per_patch parameter + # + # This parameter controls the maximum amount of points MeshGems-CADSurf is allowed + # to generate on a single CAD patch. For an automatic gestion of the memory, one + # can set this parameter to 0 + # + def SetMaxNumberOfPointsPerPatch( self, nb ): + self.Parameters().SetMaxNumberOfPointsPerPatch( nb ) + + ## Set respect_geometry parameter + # + # This patch independent option can be deactivated to allow MeshGems-CADSurf + # to lower the geometry accuracy in its patch independent process. + # + def SetRespectGeometry( self, toRespect ): + self.Parameters().SetRespectGeometry( toRespect ) + + ## Set tiny_edges_avoid_surface_intersections parameter + # + # This option defines the priority between the tiny feature + # suppression and the surface intersection prevention. + # + def SetTinyEdgesAvoidSurfaceIntersections( self, toAvoidIntersection ): + self.Parameters().SetTinyEdgesAvoidSurfaceIntersections( toAvoidIntersection ) + + ## Set closed_geometry parameter parameter + # + # Describes whether the geometry is expected to be closed or not. + # When activated, this option helps MeshGems-PreCAD to treat the dirtiest geometries. + # + def SetClosedGeometry( self, isClosed ): + self.Parameters().SetClosedGeometry( isClosed ) + + ## Set debug parameter + # + # Make MeshGems-CADSurf will be very verbose and will output some intermediate + # files in the working directory. This option is mainly meant for Distene support issues. + # + def SetDebug( self, isDebug ): + self.Parameters().SetDebug( isDebug ) + + ## Set periodic_tolerance parameter + # + # This parameter defines the maximum size difference between two periodic edges + # and also the maximum distance error between two periodic entities. + # + def SetPeriodicTolerance( self, tol ): + self.Parameters().SetPeriodicTolerance( tol ) + + ## Set required_entities parameter + # + # The required entities control the correction operations. + # Accepted values for this parameter are : + # - "respect" : MeshGems-CADSurf is not allowed to alter any required entity, + # even for correction purposes, + # - "ignore" : MeshGems-CADSurf will ignore the required entities in its processing, + # - "clear" : MeshGems-CADSurf will clear any required status for the entities. + # There will not be any entity marked as required in the generated mesh. + # + def SetRequiredEntities( self, howToTreat ): + self.Parameters().SetRequiredEntities( howToTreat ) + + ## Set sewing_tolerance parameter + # + # This parameter is the tolerance of the assembly. + # + def SetSewingTolerance( self, tol ): + self.Parameters().SetSewingTolerance( tol ) + + ## Set tags parameter + # + # The tag (attribute) system controls the optimisation process. + # Accepted values for this parameter are : + # - "respect" : the CAD tags will be preserved and unaltered by the optimisation operations, + # - "ignore" : the CAD tags will be ignored by the optimisation operations + # but they will still be present in the output mesh, + # - "clear" : MeshGems-CADSurf will clear any tag on any entity and optimise accordingly. + # There will not be any tag in the generated mesh. + # + def SetTags( self, howToTreat ): + self.Parameters().SetTags( howToTreat ) + + ## Activate removal of the tiny edges from the generated + # mesh when it improves the local mesh quality, without taking into account the + # tags (attributes) specifications. + # @param toOptimise "to optimize" flag value + # @param length minimal length under which an edge is considered to be a tiny + def SetOptimiseTinyEdges(self, toOptimise, length=-1): + self.Parameters().SetOptimiseTinyEdges( toOptimise ) + if toOptimise: + self.Parameters().SetTinyEdgeOptimisationLength( length ) + + ## Activate correction of all surface intersections + # @param toCorrect "to correct" flag value + # @param maxCost the time the user is ready to spend in the intersection prevention process + # For example, maxCost = 3 means that MeshGems-CADSurf will not spend more time + # in the intersection removal process than 3 times the time required to mesh + # without processing the intersections. + def SetCorrectSurfaceIntersection(self, toCorrect, maxCost ): + self.Parameters().SetCorrectSurfaceIntersection( toCorrect ) + if toCorrect: + self.Parameters().SetCorrectSurfaceIntersectionMaxCost( maxCost ) + ## To optimize merges edges. # @param toMergeEdges "merge edges" flag value def SetPreCADMergeEdges(self, toMergeEdges=False): - if self.Parameters().GetTopology() != PreCAD: - self.SetTopology(PreCAD) self.Parameters().SetPreCADMergeEdges(toMergeEdges) pass + ## To remove duplicate CAD Faces + # @param toRemoveDuplicateCADFaces "remove_duplicate_cad_faces" flag value + def SetPreCADRemoveDuplicateCADFaces(self, toRemoveDuplicateCADFaces=False): + self.Parameters().SetPreCADRemoveDuplicateCADFaces(toRemoveDuplicateCADFaces) + pass + ## To process 3D topology. # @param toProcess "PreCAD process 3D" flag value def SetPreCADProcess3DTopology(self, toProcess=False): - if self.Parameters().GetTopology() != PreCAD: - self.SetTopology(PreCAD) self.Parameters().SetPreCADProcess3DTopology(toProcess) pass @@ -211,8 +375,6 @@ class BLSURF_Algorithm(Mesh_Algorithm): ## To compute topology from scratch # @param toDiscardInput "discard input" flag value def SetPreCADDiscardInput(self, toDiscardInput=False): - if self.Parameters().GetTopology() != PreCAD: - self.SetTopology(PreCAD) self.Parameters().SetPreCADDiscardInput(toDiscardInput) pass @@ -234,10 +396,28 @@ class BLSURF_Algorithm(Mesh_Algorithm): # @param optionName name of the option # @param optionValue value of the option def SetPreCADOptionValue(self, optionName, optionValue): - if self.Parameters().GetTopology() != PreCAD: - self.SetTopology(PreCAD) self.Parameters().SetPreCADOptionValue(optionName,optionValue) pass + + ## Adds custom advanced option values + # @param optionsAndValues options and values in a form "option_1 v1 option_2 v2'" + def SetAdvancedOption(self, optionsAndValues): + self.Parameters().SetAdvancedOption(optionsAndValues) + pass + + ## Adds custom advanced option value. + # @param optionName custom advanced option name + # @param level custom advanced option value + def AddOption(self, optionName, level): + self.Parameters().AddOption(optionName,level) + pass + + ## Adds custom advanced PreCAD option value. + # @param optionName custom name of the option + # @param optionValue value of the option + def AddPreCADOption(self, optionName, optionValue): + self.Parameters().AddPreCADOption(optionName,optionValue) + pass ## Sets GMF file for export at computation # @param fileName GMF file name @@ -314,6 +494,42 @@ class BLSURF_Algorithm(Mesh_Algorithm): return self.Parameters().SetEnforcedVertexGeomWithGroup(theFace, theVertex,groupName) pass + ## Set an enforced vertex on a face given the coordinates of a point. + # The face if found by the application. + # @param x : x coordinate + # @param y : y coordinate + # @param z : z coordinate + # @param vertexName : name of the enforced vertex + # @param groupName : name of the group + def AddEnforcedVertex(self, x, y, z, vertexName = "", groupName = ""): + from salome.smesh.smeshBuilder import AssureGeomPublished + if vertexName == "": + if groupName == "": + return self.Parameters().AddEnforcedVertex(x, y, z) + else: + return self.Parameters().AddEnforcedVertexWithGroup(x, y, z, groupName) + pass + else: + if groupName == "": + return self.Parameters().AddEnforcedVertexNamed(x, y, z, vertexName) + else: + return self.Parameters().AddEnforcedVertexNamedWithGroup( x, y, z, vertexName, groupName) + pass + pass + + ## To set an enforced vertex on a face given a GEOM vertex, group or compound. + # The face if found by the application. + # @param theVertex : GEOM vertex (or group, compound). + # @param groupName : name of the group + def AddEnforcedVertexGeom(self, theVertex, groupName = ""): + from salome.smesh.smeshBuilder import AssureGeomPublished + AssureGeomPublished( self.mesh, theVertex ) + if groupName == "": + return self.Parameters().AddEnforcedVertexGeom(theVertex) + else: + return self.Parameters().AddEnforcedVertexGeomWithGroup(theVertex,groupName) + pass + ## To remove an enforced vertex on a given GEOM face (or group, compound) given the coordinates. # @param theFace : GEOM face (or group, compound) on which to remove the enforced vertex # @param x : x coordinate @@ -431,8 +647,13 @@ class BLSURF_Algorithm(Mesh_Algorithm): # @return hypothesis object def Parameters(self): if not self.params: - self.params = self.Hypothesis("MG-CADSurf Parameters", [], - "libBLSURFEngine.so", UseExisting=0) + hypType = "MG-CADSurf Parameters" + hasGeom = self.mesh.GetMesh().HasShapeToMesh() + if hasGeom: + self.params = self.Hypothesis(hypType, [], LIBRARY, UseExisting=0) + else: + self.params = self.Hypothesis(hypType + "_NOGEOM", [], LIBRARY, UseExisting=0) + self.mesh.smeshpyD.SetName( self.params, hypType ) pass return self.params @@ -478,122 +699,36 @@ class BLSURF_Algorithm(Mesh_Algorithm): self.Parameters().AddPreCadEdgesPeriodicity(theEdge1, theEdge2) pass - #----------------------------------------- - # Periodicity (BLSURF without PreCAD) + # Hyper-Patches #----------------------------------------- - - - ## Defines periodicity between two faces, without using PreCAD. - # User has to call AddEdgePeriodicity with the edges of the face, - # and AddVertexPeriodicity with the vertices of each edge. - # @param theFace1 : GEOM face to associate with theFace2 - # @param theFace2 : GEOM face associated with theFace1 - def AddFacePeriodicity(self, theFace1, theFace2): - self.Parameters().AddFacePeriodicity(theFace1, theFace2) - pass - - ## Defines periodicity between two edges belonging to two periodic faces, without using PreCAD. - # To be used with AddFacePeriodicity. - # User has to call AddVertexPeriodicity with the vertices of each edge - # @param theFace1 : GEOM face to associate with theFace2 - # @param theEdge1 : GEOM edge to associate with theEdge2 - # @param theFace2 : GEOM face associated with theFace1 - # @param theEdge2 : GEOM edge associated with theEdge1 - # @param theEdgeOrientation : -1 (reversed), 0 (unknown) or 1 (forward) - def AddEdgePeriodicity(self, theFace1, theEdge1, theFace2, theEdge2, theEdgeOrientation=0): - self.Parameters().AddEdgePeriodicity(theFace1, theEdge1, theFace2, theEdge2, theEdgeOrientation) - pass - - ## Defines periodicity between two edges without face periodicity, without using PreCAD. - # User has to call AddVertexPeriodicity with the vertices of each edge. - # @param theEdge1 : GEOM edge to associate with theEdge2 - # @param theEdge2 : GEOM edge associated with theEdge1 - # @param theEdgeOrientation : -1 (reversed), 0 (unknown) or 1 (forward) - def AddEdgePeriodicityWithoutFaces(self, theEdge1, theEdge2, theEdgeOrientation=0): - self.Parameters().AddEdgePeriodicityWithoutFaces(theEdge1, theEdge2, theEdgeOrientation) - pass - - ## Defines periodicity between two vertices. - # To be used with AddFacePeriodicity and AddEdgePeriodicity. - # @param theEdge1 : GEOM edge to associate with theEdge2 - # @param theVertex1 : GEOM face to associate with theVertex2 - # @param theEdge2 : GEOM edge associated with theEdge1 - # @param theVertex2 : GEOM face associated with theVertex1 - def AddVertexPeriodicity(self, theEdge1, theVertex1, theEdge2, theVertex2): - self.Parameters().AddVertexPeriodicity(theEdge1, theVertex1, theEdge2, theVertex2) - pass - - ## Define periodicity between two groups of faces, given a transformation function. - # This uses the basic BLSURF API for each face, each edge, and each vertex. - # @param theFace1 : GEOM face (or group, compound) to associate with theFace2 - # @param theFace2 : GEOM face (or group, compound) associated with theFace1 - # @param f_transf : python function defining the transformation between an object of theFace1 - # into an object of theFace2 - def AddAdvancedFacesPeriodicity(self, theFace1, theFace2, f_transf): - source_faces = self.geompyD.SubShapeAll(theFace1, self.geompyD.ShapeType["FACE"]) - i = 0 - j = 0 - k = 0 - for source_face in source_faces: - self.geompyD.addToStudyInFather(theFace1, source_face, "source_face_%i"%i) - p_source = self.geompyD.MakeVertexInsideFace(source_face) - p_target = f_transf(p_source) - target_face = self.geompyD.GetFaceNearPoint(theFace2, p_target) - self.geompyD.addToStudyInFather(theFace2, target_face, "target_face_%i"%i) - self.AddFacePeriodicity(source_face, target_face) - i += 1 - - source_edges = self.geompyD.SubShapeAll(source_face, self.geompyD.ShapeType["EDGE"]) - for source_edge in source_edges: - self.geompyD.addToStudyInFather(theFace1, source_edge, "source_edge_%i"%(j)) - p_source = self.geompyD.MakeVertexOnCurve(source_edge, 0.5) - p_target = f_transf(p_source) - target_edge = self.geompyD.GetEdgeNearPoint(theFace2, p_target) - self.geompyD.addToStudyInFather(theFace2, target_edge, "target_edge_%i"%(j)) - self.AddEdgePeriodicity(source_face, source_edge, target_face, target_edge, 1) - j += 1 - - source_vertices = self.geompyD.SubShapeAll(source_edge, self.geompyD.ShapeType["VERTEX"]) - for source_vertex in source_vertices: - self.geompyD.addToStudyInFather(theFace1, source_vertex, "source_vertex_%i"%(k)) - target_vertex_tmp = f_transf(source_vertex) - target_vertex = self.geompyD.GetSame(theFace2, target_vertex_tmp) - self.geompyD.addToStudyInFather(theFace2, target_vertex, "target_vertex_%i"%(k)) - self.AddVertexPeriodicity(source_edge, source_vertex, target_edge, target_vertex) - k += 1 + + ## Defines hyper-patches. A hyper-patch is a set of adjacent faces meshed as a whole, + # ignoring edges between them + # @param hyperPatchList : list of hyper-patches. A hyper-patch is defined as a list of + # faces or groups of faces. A face can be identified either as a GEOM object or + # a face ID (returned e.g. by geompy.GetSubShapeID( mainShape, subShape )). + # + # Example: cadsurf.SetHyperPatches([[ Face_1, Group_2 ],[ 13, 23 ]]) + def SetHyperPatches(self, hyperPatchList): + hpl = [] + for patch in hyperPatchList: + ids = [] + for face in patch: + if isinstance( face, int ): + ids.append( face ) + elif isinstance( face, GEOM._objref_GEOM_Object): + faces = self.mesh.geompyD.SubShapeAll( face, self.mesh.geompyD.ShapeType["FACE"] ) + for f in faces: + ids.append( self.mesh.geompyD.GetSubShapeID( self.mesh.geom, f )) + else: + raise TypeError, \ + "Face of hyper-patch should be either ID or GEOM_Object, not %s" % type(face) + pass + hpl.append( ids ) pass - - ## Define periodicity between two groups of edges, without faces, given a transformation function. - # This uses the basic BLSURF API for each edge and each vertex. - # @param theFace1 : GEOM edge (or group, compound) to associate with theEdge2 - # @param theFace2 : GEOM edge (or group, compound) associated with theEdge1 - # @param f_transf : python function defining the transformation between an object of theEdge1 - # into an object of theFace2 - def AddAdvancedEdgesPeriodicity(self, theEdge1, theEdge2, f_transf): - source_edges = self.geompyD.SubShapeAll(theEdge1, self.geompyD.ShapeType["EDGE"]) - j = 0 - k = 0 - for source_edge in source_edges: - self.geompyD.addToStudyInFather(theEdge1, source_edge, "source_edge_%i"%j) - p_source = self.geompyD.MakeVertexOnCurve(source_edge, 0.5) - p_target = f_transf(p_source) - target_edge = self.geompyD.GetEdgeNearPoint(theEdge2, p_target) - self.geompyD.addToStudyInFather(theEdge2, target_edge, "target_edge_%i"%j) - self.AddEdgePeriodicityWithoutFaces(source_edge, target_edge) - - j += 1 - - source_vertices = self.geompyD.SubShapeAll(source_edge, self.geompyD.ShapeType["VERTEX"]) - for source_vertex in source_vertices: - self.geompyD.addToStudyInFather(theEdge1, source_vertex, "source_vertex_%i"%k) - target_vertex_tmp = f_transf(source_vertex) - target_vertex = self.geompyD.GetSame(theEdge2, target_vertex_tmp) - self.geompyD.addToStudyInFather(theEdge2, target_vertex, "target_vertex_%i"%k) - self.AddVertexPeriodicity(source_edge, source_vertex, target_edge, target_vertex) - - k += 1 - pass + self.Parameters().SetHyperPatches( hpl ) + return #===================== # Obsolete methods