Get lengths/position of points/lines from selected face?
Lauren_Froschauer
Member Posts: 10 EDU
I am trying to cut down on the number of user inputs for the box joint feature. I remember Kevin mentioning that I could query the length of an edge or the position of a point etc. from a selected face.
Kevin, which command were you referring to? Could you give me some example code using it?
Kevin, which command were you referring to? Could you give me some example code using it?
0
Comments
-
To get the distance from a point to a plane (i.e. the z-component of the point from the plane's perspective):
distance is ValueWithUnits = worldToPlane(plane, worldPoint)[2];(this should probably just be in std)
To get the length of an edge:length is ValueWithUnits = evLength(context, {entities : edgeQuery});
0 -
Is there a way to evaluate the length of all the edges of a face by just selecting a face?
Is there a way to return the coordinates of the two vertices that define an edge by selecting the face that the edge belongs to?0 -
For getting the perimiter of a face, you can pass
qEdgeAdjacent(face, EntityType.EDGE)toevLength. To get the vertices of an edge, query for them usingqVertexAdjacent(edge, EntityType.VERTEX)and useevVertexPointusing either the evaluated vertex query or usingqNthElement.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0


