wrap.selectPoints¶
-
wrap.
selectPoints
(geomLeft, geomRight = None, pointsLeft = [], pointsRight = [])¶ Creates modal dialog for selecting point correspondences. If geomRight is None then dialog shows just one viewport.
Returned points can be then saved by
wrap.savePoints()
and loaded bywrap.loadPoints()
Parameters: geomLeft, geomRight :
wrap.Geom
Left and right geometry that will be displayed in left and right window.
pointsLeft, pointsRight : sequence of
wrap.PointOnTriangle
, optionalFor demonstration purposes you can provide user with some pre-defined selection.
Returns: tuple of two lists of
wrap.PointOnTriangle
if geomRight is not None.if geomRight is None then function returns list of
wrap.PointOnTriangle
Notes
This function was updated in 1.3.3.
Examples
geom = wrap.Geom(wrap.demoModelsPath + '/HeadPolygroups_MakeHuman.obj') # Show dialog with just one geom and no predefined points wrap.selectPoints(geom) # Predefined points from left side of the head points = [ wrap.PointOnTriangle(3640,0.5,0.0), wrap.PointOnTriangle(3753,0.3,0.0), wrap.PointOnTriangle(4399,0.19,0.0), wrap.PointOnTriangle(3132,0.0,0.6)] # Show dialog with just one geom and predefined points points = wrap.selectPoints(geom,None,points) geomScan = wrap.Geom(wrap.demoModelsPath + '/FaceScan_Ten24.obj') # Select corresponding points between two geometries (pointsGeom, pointsGeomScan) = wrap.selectPoints(geom,geomScan)