1 |
+ |
Imports SolidWorks.Interop |
2 |
+ |
Imports SolidWorks.Interop.swconst |
3 |
+ |
Imports SolidWorks.Interop.swpublished |
4 |
+ |
|
5 |
|
Module Intersections |
6 |
|
Public DefAttrInterALAL As SldWorks.AttributeDef |
7 |
|
Public DefAttrConditionLimite As SldWorks.AttributeDef |
31 |
|
' ******* |
32 |
|
' quelques options de performance |
33 |
|
' ******* |
34 |
< |
swApp.SetUserPreferenceIntegerValue(SwConst.swUserPreferenceIntegerValue_e.swAutoSaveInterval, 0) |
34 |
> |
swApp.SetUserPreferenceIntegerValue(swconst.swUserPreferenceIntegerValue_e.swAutoSaveInterval, 0) |
35 |
|
swModel.SetAddToDB(True) |
36 |
|
swModel.SetDisplayWhenAdded(False) |
37 |
|
' ****** |
74 |
|
' ******* |
75 |
|
' quelques options de performance, remettre à la position initiale |
76 |
|
' ******* |
77 |
< |
swApp.SetUserPreferenceIntegerValue(SwConst.swUserPreferenceIntegerValue_e.swAutoSaveInterval, 15) |
77 |
> |
swApp.SetUserPreferenceIntegerValue(swconst.swUserPreferenceIntegerValue_e.swAutoSaveInterval, 15) |
78 |
|
swModel.SetAddToDB(False) |
79 |
|
swModel.SetDisplayWhenAdded(True) |
80 |
|
swModel.GraphicsRedraw2() |
187 |
|
|
188 |
|
nom = "InterALAL" |
189 |
|
DefAttrInterALAL = swApp.DefineAttribute(nom) |
190 |
< |
DefAttrInterALAL.AddParameter("X", SwConst.swParamType_e.swParamTypeDouble, 0, 0) |
191 |
< |
DefAttrInterALAL.AddParameter("Y", SwConst.swParamType_e.swParamTypeDouble, 0, 0) |
192 |
< |
DefAttrInterALAL.AddParameter("Z", SwConst.swParamType_e.swParamTypeDouble, 0, 0) |
193 |
< |
DefAttrInterALAL.AddParameter("T", SwConst.swParamType_e.swParamTypeDouble, -1, 0) |
190 |
> |
DefAttrInterALAL.AddParameter("X", swconst.swParamType_e.swParamTypeDouble, 0, 0) |
191 |
> |
DefAttrInterALAL.AddParameter("Y", swconst.swParamType_e.swParamTypeDouble, 0, 0) |
192 |
> |
DefAttrInterALAL.AddParameter("Z", swconst.swParamType_e.swParamTypeDouble, 0, 0) |
193 |
> |
DefAttrInterALAL.AddParameter("T", swconst.swParamType_e.swParamTypeDouble, -1, 0) |
194 |
|
retval = DefAttrInterALAL.Register() |
195 |
|
If retval = False Then MsgBox("Enregistrement raté pour le InterALAL") |
196 |
|
|
197 |
|
|
198 |
|
nom = "ConditionLimite" |
199 |
|
DefAttrConditionLimite = swApp.DefineAttribute(nom) |
200 |
< |
DefAttrConditionLimite.AddParameter("CL", SwConst.swParamType_e.swParamTypeString, 0, 0) |
200 |
> |
DefAttrConditionLimite.AddParameter("CL", swconst.swParamType_e.swParamTypeString, 0, 0) |
201 |
|
retval = DefAttrConditionLimite.Register() |
202 |
|
If retval = False Then MsgBox("Enregistrement raté pour le COndition Limite") |
203 |
|
|
976 |
|
' function qui détecte si une arête coupe une face, si c'est le cas la function retourne true et remplie le tableau xyz avec le point d'intersection |
977 |
|
|
978 |
|
Dim P1 As Object = Nothing, p2 As Object = Nothing |
979 |
< |
If swModel.ClosestDistance(swArete, swFace, P1, P2) > Epsilon Then Return False |
979 |
> |
If swModel.ClosestDistance(swArete, swFace, P1, p2) > Epsilon Then Return False |
980 |
|
|
981 |
|
Dim swCurve As SldWorks.Curve |
982 |
|
Dim swSurf As SldWorks.Surface |