# Acquire vertex positions of a particular face in a 3-D edgesgeometry

Hi, I have an interesting problem I am not able to figure out but I am sure there are many efficient answers. I am looking for the most efficient method. I have a wireframe for a 3-D geometry that is defined as an EdgesGeometry. Now this object has many faces but given that a vertex ‘P’ exists inside one of these faces, I need to extract only the edgevertices on the same face as ‘P’. I have given an image below to show what I want. I only need to extract vertices of the edges geometry of the entire 3-D wireframe that exist as the same face as P. (Basically given P, I need to extract all the green points.

UPDATE: I solved this issue! Heres how I did it:
Create a plane on the same face as that on which ‘P’ lies. Then check the distances of the points of the EdgesGeometry. If the distance is 0, then render these points, else don’t render them.

``````        var planeOfP = new THREE.Plane();
planeOfP.setFromNormalAndCoplanarPoint(faceNormalofP, positionOfP);
var dotGeometry = new THREE.Geometry();
for (var i = 0; i < (edgesGeom.attributes.position.count); i++) {
let position = edgesGeom.attributes.position;
var x = position.array[3*i];
var y = position.array[3*i+1];
var z = position.array[3*i+2];
var pointVector = new THREE.Vector3(x,y,z)
var dist = this.spotPlane.distanceToPoint(pointVector)

if (dist == 0)
dotGeometry.vertices.push(pointVector);

}

var dotMaterial = new THREE.PointsMaterial({ size: 5, sizeAttenuation: false, color: 0xff0000 });
var dots = new THREE.Points(dotGeometry, dotMaterial);

this.scene.add(dots);``````