34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
|
--- ./src/Mod/Mesh/App/MeshTestsApp.py.orig
|
||
|
+++ ./src/Mod/Mesh/App/MeshTestsApp.py
|
||
|
@@ -423,30 +423,6 @@
|
||
|
self.planarMesh = []
|
||
|
FreeCAD.newDocument("MeshTest")
|
||
|
|
||
|
- def testRayPick(self):
|
||
|
- if not FreeCAD.GuiUp:
|
||
|
- return
|
||
|
- self.planarMesh.append( [-16.097176,-29.891157,15.987688] )
|
||
|
- self.planarMesh.append( [-16.176304,-29.859991,15.947966] )
|
||
|
- self.planarMesh.append( [-16.071451,-29.900553,15.912505] )
|
||
|
- self.planarMesh.append( [-16.092241,-29.893408,16.020439] )
|
||
|
- self.planarMesh.append( [-16.007210,-29.926180,15.967641] )
|
||
|
- self.planarMesh.append( [-16.064457,-29.904951,16.090832] )
|
||
|
- planarMeshObject = Mesh.Mesh(self.planarMesh)
|
||
|
-
|
||
|
- from pivy import coin; import FreeCADGui
|
||
|
- Mesh.show(planarMeshObject)
|
||
|
- view=FreeCADGui.ActiveDocument.ActiveView.getViewer()
|
||
|
- rp=coin.SoRayPickAction(view.getSoRenderManager().getViewportRegion())
|
||
|
- rp.setRay(coin.SbVec3f(-16.05,16.0,16.0),coin.SbVec3f(0,-1,0))
|
||
|
- rp.apply(view.getSoRenderManager().getSceneGraph())
|
||
|
- pp=rp.getPickedPoint()
|
||
|
- self.assertTrue(pp != None)
|
||
|
- det=pp.getDetail()
|
||
|
- self.assertTrue(det.getTypeId() == coin.SoFaceDetail.getClassTypeId())
|
||
|
- det=coin.cast(det, det.getTypeId().getName().getString())
|
||
|
- self.assertTrue(det.getFaceIndex() == 1)
|
||
|
-
|
||
|
def testPrimitiveCount(self):
|
||
|
if not FreeCAD.GuiUp:
|
||
|
return
|