Hello!
I'm not very good in English so I hope that you can understand me !
I'm searching to create a 3D point which is the intersection between some 3D Face and ONE straight line. With my code, no intersections are found. In the forum, I didn't see my case of study.
After loading the model composed of 3D Face, I do :
ReDim ssobjs(0 To ThisDrawing.ModelSpace.Count - 1) As AcadEntity
Dim f As Integer
For f = 0 To ThisDrawing.ModelSpace.Count - 1
Set ssobjs(f) = ThisDrawing.ModelSpace.Item(f)
Next
Now, in ssobjs I have (f-1) 3D Face.
Then I create my straight line :
Dim lineobj As AcadLine
Set lineobj = ThisDrawing.ModelSpace.AddLine(Position_slt_1.Coordinates, Point_arbitraire.Coordinates)
Finally, I search the intersection with intersectionwith method :
Dim intPoints As Variant
Dim h As Integer
For h = 0 To f - 1 Step 1
intPoints = lineobj.IntersectWith(ssobjs(h), acExtendNone)
next
And here, i have nothing affected in variable intpoints...
I want to have the 3D coordinate of the first point intersected.
Normally, it must be : {intpoints(0);intpoints(1);intpoints(2)}
You are my last chance because nobody can help me and it is my third forum !
Thank you very much and have a nice evening !
Regards
Charles