Pick Object

Offers a set of tools to find or set specific points, edges or areas. Some methods/functions specify the objects that have to be picked by an id number. This id number is unique for every object. If not specified otherwise, the numbering starts with 0. Please note: If a solid changes such that new faces/edges/points are created, the id number might change!

Edge Modifications

AddEdge ( int u1, int v1, int w1, int u2, int v2, int w2 )

Defines an edge with the starting point (u1,v1,w1) and the end point (u2,v2,w2). The points are taken as coordinates in the actual working coordinate system (WCS).

 

DeleteEdge ( int id )

Deletes a picked edge, specified by an identity number.

 

MeanEdge ( string indices )

Creates a mean edge out of the given ones (specified by the indices). Indices is a comma-separated list of negative numbers. The negative sign indicates that these numbers were stored in the list of selected edges.

 

MoveEdge ( int id, double deltax, double deltay, double deltaz, bool keep )

Moves the mid point of an edge (specified by id) in deltax, deltay and deltaz direction. The direction of the edge is kept, so it is only a collinear displacement.

Keep indicates weather the picked original edge will be kept (true) or deleted (false).

This method represents the macro implementation of the "modify action" from Modeling: Picks Pick Lists   Selected Edges Pick List .

 

MoveEdgeInPlane ( int id, double offset, bool keep )

Moves the edge - defined from the latest picked face - tangential to the plane. Offset specifies how much the edge is moved from edge’s origin. Keep indicates weather the picked original edge will be kept (true) or deleted (false).

 

PickEdgeFromPickedPoints ( int id1, int id2 )

Picks a single edge which is specified by the identity numbers of two previously picked points.

General Methods

ClearAllPicks

Clears all previously chosen picks (edge, face, point).

 

NextPickToDataBase ( int id )

The next pick point will be written to an internal database.

 

SnapLastPointToDraplane

The last selected point will be projected to the drawing plane. In contrast to the Modeling: Picks Picks Snap points to drawing plane  - which depends on the current view - the macro command is view independent.

Pick Edges from Solids (Id based)

PickDanglingEdgeChainFromId ( string shapeName, int id )

Picks a dangling edge chain (a set of connected edges) of a solid. The edge chain is specified by the solid that it belongs to and an identity number. A dangling edge has only one adjacent face.

 

PickEdgeFromId ( string shapeName, int edge_id , int  vertex_id )

Picks an edge of a solid. The edge is specified by the solid that it belongs to and an identity number. 'vertex_id' is the index of the start point of this edge.

 

PickEdgeFromPoint ( string shapeName, double xpoint, double ypoint, double zpoint )

Pick’s an edge of a solid - using a point on the edge - whereby the point is always defined

in global coordinates. The method so represents the Modeling: Picks Picks Absolute Pick Positioning mode

 

PickSolidEdgeChainFromId ( string shapeName, int edgeid, int faceid )

Picks an edge chain (a set of connected edges) of a solid. The edge chain is specified by the solid that it belongs to and two identity numbers.

Pick Faces

PickFaceChainFromId ( string shapeName,  int faceId )

Picks a face chain (a set of connected faces) of a solid. The face chain is specified by the solid that it belongs to and an identity number.

 

PickFaceFromId ( string shapeName,  int id )

Picks a face of a solid.  The face is specified by the solid that it belongs to and an identity number.

 

PickFaceFromPoint ( string shapeName, double xpoint, double ypoint, double zpoint )

Pick’s a face - using a point on the face - whereby the point is always defined in global coordinates. The method so represents the Modeling: Picks Picks Absolute Pick Positioning mode.

Pick Modifications

ChangeFaceId  ( string  shapeName, string  changestatement, string  versionnumber )

Used for backward compatibility of old projects that contain invalid pick id's. The pick id's of picked faces can be changed. ShapeName is the name of the picked solid. Changestatement indicates what id has to be replaced with which new id. Versionnumber indicates the design environment in which the replacement is valid.

 

ChangeEdgeId  ( string  shapeName, string  changestatement, string  versionnumber )

Used for backward compatibility of old projects that contain invalid pick id's. The pick id's of picked edges can be changed. ShapeName is the name of the picked solid. Changestatement indicates what id has to be replaced with which new id. Versionnumber indicates the design environment in which the replacement is valid.

 

ChangeVertexId  ( string  shapeName, string  changestatement, string  versionnumber )

Used for backward compatibility of old projects that contain invalid pick id's. The pick id's of picked vertices can be changed. ShapeName is the name of the picked solid. Changestatement indicates what id has to be replaced with which new id. Versionnumber indicates the design environment in which the replacement is valid.

 

DeleteFace ( int id )

Deletes a picked face, specified by an identity number.

 

DeletePoint ( int id )

Deletes a picked point, specified by an identity number.

 

MeanPoint ( string indices )

Creates a mean point out of the given ones (specified by the indices). Indices is a comma-separated list of negative numbers. The negative sign indicates that these numbers were stored in the list of selected points.

 

MeanPointAll

Creates the mean of  the latest  two picked points and replaces them with the newly created one. It represents the macro implementation of the command Modeling: Picks Pick Point   Mean Last two points

 

MovePoint ( int id, double deltax, double deltay, double deltaz, bool keep )

Moves a point (specified by id) in deltax, deltay and deltaz direction.

Keep indicates weather the picked original edge will be kept (true) or deleted (false).

This method represents the macro implementation of the "modify" action in Modeling: Picks Pick Lists  .

 

PickPointFromCoordinates ( double x, double y, double z )

Picks a point. The point is specified by the desired position in space.

Pick Points from Curves (Coordinate based)

PickCurveCirclecenterFromPoint ( string curveName, double x, double y, double z )

Picks the center point of a circular curve. The point is specified by the curve that it belongs to and the desired position in space.

 

PickCurveCirclepointFromPoint ( string curveName, double x, double y, double z, int index )

Picks a point on a circular curve. The point is specified by the curve that it belongs to and the desired position in space. Furthermore there are four possible positions on the curve, defined by an index (0-3), each with a phase shift of 90 degree.

 

PickCurveEndpointFromPoint ( string curveName, double x, double y, double z )

Picks the end point of a curve. The point is specified by the curve that it belongs to and the desired position in space.

 

PickCurveMidpointFromPoint ( string curveName, double x, double y, double z )

Picks the middle point of a curve segment. The point is specified by the curve that it belongs to and the desired position in space.

Pick Points from Curves (Id based)

PickCurveCirclecenterFromId ( string curveName, int id )

Picks the center point of a circular curve. The point is specified by the curve that it belongs to and an identity number.

 

PickCurveCirclepointFromId ( string curveName, int id, int index )

Picks a point on a circular curve. The point is specified by the curve that it belongs to and an identity number. Furthermore there are four possible positions on the curve, defined by an index (0-3), each with a phase shift of 90 degree.

 

PickCurveEndpointFromId ( string curveName, int id )

Picks the end point of a curve. The point is specified by the curve that it belongs to and an identity number.

 

PickCurveMidpointFromId ( string curveName, int id )

Picks the middle point of a curve segment. The point is specified by the curve that it belongs to and an identity number.

Pick Points from Solids (Coordinate based)

PickCenterpointFromPoint ( string shapeName, double x, double y, double z )

Picks the center point of a face. The point is specified by the solid that it belongs to and the desired position in space.

 

PickCirclecenterFromPoint ( string shapeName, double x, double y, double z )

Picks the center point of a circular face. The point is specified by the solid that it belongs to and the desired position in space.

 

PickCirclepointFromPoint ( string shapeName, double x, double y, double z )

Picks the edge point of a circular face. The point is specified by the solid that it belongs to and the desired position in space.

 

PickEndpointFromPoint ( string shapeName, double x, double y, double z )

Picks the end point of a edge. The point is specified by the solid that it belongs to and the desired position in space.

 

PickMidpointFromPoint ( string shapeName, double x, double y, double z )

Picks the middle point of an edge. The point is specified by the solid that it belongs to and the desired position in space.

Pick Points from Solids (Id based)

PickCenterpointFromId  ( string shapeName, int id )

Picks the center point of a face. The face is specified by the solid that it belongs to and an identity number.

 

PickCirclecenterFromId ( string shapeName, int id )

Picks the center point of a circular face. The face is specified by the solid that it belongs to and an identity number.

 

PickCirclepointFromId ( string shapeName, int id )

Picks the edge point of a circular face. The face is specified by the solid that it belongs to and an identity number.

 

PickEndpointFromId ( string shapeName, int id )

Picks the end point of an edge. The edge is specified by the solid that it belongs to and an identity number.

 

PickExtraCirclepointFromId ( string shapeName, int edgeid, int faceid, int index )

Picks an extra edge point of a circular face. The edge and face are specified by the solid that it belongs to and two identity numbers. Compared to PickCirclepointFromId there are three additional possible positions on the edge, defined by an index (0-2), each with a phase shift of 90 degree.

 

PickExtraSpherepointFromId ( string shapeName, int faceid, int index )

Picks an extra point of a spherical face. The face is specified by the solid that it belongs to and an identity number. For a sphere there are six additional points positioned on the longitude and latitude lines of the sphere.

 

PickMidpointFromId ( string shapeName, int id )

Picks the middle point of an edge. The edge is specified by the solid that it belongs to and an identity number.

Pick Points from Wires

PickWireEndpointFromId ( string curvename, int id )

Picks the wire end point. The end point  is specified by the curve that it belongs to and an identity number.

 

PickWireEndpointFromPoint ( string curvename, double x, double y, double z )

Picks the wire end point. The end point  is specified by the curve that it belongs to and the point coordinates.

Pick Faces from Coils

PickCoilFaceFromId ( string coilname, int id )

Picks a face of the coil. The face is specified by the coil that it belongs to and an identity number.

 

PickCoilFaceFromPoint ( string coilname, double x, double y, double z )

Picks a face of the coil. The face  is specified by the coil that it belongs to and the point coordinates.

Queries

GetEdgeIdFromPoint ( string shapename, double x, double y, double z ) long

Returns the edge id at a given point for one shape.

 

GetFaceIdFromPoint ( string shapename, double x, double y, double z ) long

Returns the face id at a given point for one shape.

 

GetNumberOfPickedPoints  int

Returns the total number of picked points.

 

GetNumberOfPickedEdges  int

Returns the total number of picked edges.

 

GetNumberOfPickedFaces  int

Returns the total number of picked faces.

 

GetPickpointCoordinates ( int index, double_ref x, double_ref y, double_ref z ) bool

Returns the coordinates of a picked point through the argument list. The picked point is specified by index starting with 1.

 

GetPickedEdgeFromIndex ( int index, long_ref edgeid, long_ref vertexid ) string

Returns the shapename of a picked edge. The edge id  and the vertex id is returned through the argument list. The picked edge is specified by index starting with 1.

 

GetPickedFaceFromIndex ( int index, long_ref  faceid) string

Returns the shapename of a picked face. The face id is returned through the argument list. The picked face is specified by index starting with 1.

 

GetPickedFaceAreaFromIndex ( int index ) double

Returns the surface area of a picked face. The picked face is specified by index starting with 1.

 

GetVertexIdFromPoint ( string shapename, double x, double y, double z ) long

Returns the edge id at a given point for one shape.

 

ExportFaceTriangles ( string filename, double maxlen, double surftol )

Triangulates the picked faces using the given maximum edge length maxlen and surface tolerance surftol and writes the triangle points and normals to a file named filename.