PointOption
Object for a point option.
A point option is the definition of a point via its scene, i.e. an end point of an edge as well as the middle between two points. Possible are (nearly) all 3-D point options of the point options menu.
There will be a new evaluation for the point option when accessing the point option (query via the coordinates) or if the point option has been allocated to a point variable. The active coordinate system will be used if there are coordinates (absolute, relative, polar) in the point option.
Access to the point option is permitted as long as 'Exists' is true. Modifications of the HiCAD data structure, like deleting or processing parts do not result in the fact that you can no longer work with the point option object.
|
|
|
FUNC |
COM |
SF |
---|---|---|---|---|---|
Clear |
Clears the object. |
void Clear ( ) |
1211.2 |
1211.2 |
+ |
Empty |
Is the object engaged? |
bool Empty ( ) |
1211.2 |
1211.2 |
+ |
Exists |
Is it possible to reconstruct the point option? |
bool Exists ( ) |
1211.2 |
1211.2 |
+ |
X |
X-coordinate (recalculates the point option.) |
double X () |
1211.2 |
1211.2 |
+ |
Y |
Y-coordinate (recalculates the point option.) |
double Y () |
1211.2 |
1211.2 |
+ |
Z |
Z-coordinate (recalculates the point option.) |
double Z () |
1211.2 |
1211.2 |
+ |
StoreInPartCoor |
Saves the point option of the object as a new point option 'Point in part coordinate system'. |
void StoreInPartCoor (const Part& p, PointOption& po) |
1211.2 |
1211.2 |
+ |
Example PointOption
START 59
FUNC delete sel
FUNC Selection sel
FUNC delete vars
FUNC Variables vars
FUNC delete activePart
FUNC Part activePart
FUNC delete po
FUNC PointOption po
REM newly defined point options empty
FUNC %b:= po.Empty()
if (%b <> 0) then
wait point option engaged
else
wait point option not engaged
ifend
REM variables of active part
FUNC activePart.StoreActive()
FUNC vars.MakeVars(activePart)
REM transfer data of the variables to the point option
FUNC vars.GetPointVar ("p1", po)
REM if variable exists, point option is now engaged.
FUNC %b:= po.Empty()
if (%b <> 0) then
wait point option engaged
else
wait point option not engaged
ifend
REM empty point option
FUNC po.Clear()
FUNC %b:= po.Empty()
if (%b <> 0) then
wait point option engaged
else
wait point option not engaged
ifend
REM select point option
FUNC sel.SetText("Select point please")
FUNC sel.Select(po)
REM if selection not aborted, point option is now engaged
FUNC %b := po.Empty()
if b <> 0 then
wait aborted
else
wait point option selected
REM show coordinates of point option
FUNC %x:= po.x()
FUNC %y:= po.y()
FUNC %z:= po.z()
wait %x
wait %y
wait %z
REM REM save point option on variable 'p1'
FUNC vars.SetPointVar ("p1", po)
ifend
END