ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magicsld/SuperSommet.vb
(Generate patch)

Comparing magicsld/SuperSommet.vb (file contents):
Revision 129 by bournival, Wed Aug 22 21:18:12 2007 UTC vs.
Revision 130 by bournival, Wed Jul 30 21:26:03 2008 UTC

# Line 214 | Line 214 | Public Class SuperSommet
214              nom = "Doublon" & CStr(no)
215              attr = Intersections.DefAttrDoublon.CreateInstance5(swModel, Me.swSommet, nom, 0, 2)
216              no += 1
217 +            If no > 1000 Then MsgBox("Incapable de mettre un attribut sur un sommet non sélectionnable!") : no -= 500 : Exit While
218          End While
219  
220          ParamMaitre = attr.GetParameter("Maitre")
221          ParamMaitre.SetStringValue2(NomMaitre, 2, "")  ' swAllConfiguration = 2
222  
223 <        GererDossiers("Doublons", nom)
223 >        'GererDossiers("Doublons", nom)
224          no += 1
225          Me.colorer()
226  
# Line 237 | Line 238 | Public Class SuperSommet
238      Public Sub colorer(Optional ByVal rouge As Integer = 255, Optional ByVal vert As Integer = 0, Optional ByVal bleu As Integer = 0, Optional ByVal epaisseur As Double = 1.5)
239          Me.swSommet.display(swModel, RGB(rouge, vert, bleu), epaisseur, True)
240      End Sub
241 +
242 +
243 +
244 +    ''' <summary>
245 +    ''' Sélectionne l'arète, mais s'assure de ne pas la désélectionner si elle est déjà sélectionnée
246 +    ''' </summary>
247 +    ''' <remarks>Pas très rapide...</remarks>
248 +    Public Sub SelectionnerSafe()
249 +        Dim swEnt As sldworks.Entity = Me.swSommet
250 +        Dim selMgr As sldworks.SelectionMgr = swModel.SelectionManager
251 +
252 +        For i As Integer = 1 To selMgr.GetSelectedObjectCount2(-1)
253 +            If selMgr.GetSelectedObject6(i, -1) Is swEnt Then
254 +                Exit Sub
255 +            End If
256 +        Next
257 +
258 +        swEnt.Select4(True, Nothing)
259 +    End Sub
260 +
261 +
262 +    ''' <summary>
263 +    ''' Retourne vrai si les 2 sommets sont identiques...
264 +    ''' </summary>
265 +    ''' <param name="swSommet"></param>
266 +    ''' <returns></returns>
267 +    ''' <remarks></remarks>
268 +    Public Function Comparer(ByRef swSommet As sldworks.Vertex) As Boolean
269 +        If Commun.Distance(Me.swSommet, swSommet) < Epsilon Then Return True
270 +    End Function
271 +
272   End Class

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines