For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

AIS_LINE selection problems

Marco Balen's picture
Forums: 

I have a problem when building INFINITE AIS_lines. The selection mechanism seems to identify these lines only in an area of about 260mm around the origin 0,0,0.
The lines aouter of 260mm are selencted in a random way.
Someone have a suggestion ?

Marco Balen's picture

I have solved the problem using :

UnitsAPI::SetLocalSystem(UnitsAPI_MDTV);

in my application.

It seems that creation and selection of AIS_LINE uses differrents methods.
In particular, the "ComputeInfiniteLineSelection()" function of AIS_LINE
assume a "selection lenght" of 250000mm. But this value is converted to 250mt by the instruction :

Standard_Real aLength = UnitsAPI::AnyToLS (250000. ,"mm");

In this way "250" is the lenght of lines.

Settings the "LocalSystem" to "UnitsAPI_MDTV" the drawing and selection functions works in the same way.

I hope that I don't have any other problems due to the setting "UnitsAPI_MDTV".

Have anyone done the same experience ?