Clean Chinese/garbled characters in docs and comments

This commit is contained in:
yuan dian 2026-02-28 16:16:31 +08:00
parent bd891a96dd
commit 8e241688d0
3 changed files with 86 additions and 84 deletions

View file

@ -1,79 +1,79 @@
# 1Android Platform # 1 Android Platform
**Android compilation** depends on the NDK toolchain. Currently, version r25c is recommended. Download link: https://github.com/android/ndk/wiki/Unsupported-Downloads **Android compilation** depends on the NDK toolchain. Currently, version r25c is recommended. Download link: https://github.com/android/ndk/wiki/Unsupported-Downloads
## NDK toolchain configuration ## NDK toolchain configuration
- Verify whether the ndk-build compilation environment exists: - Verify whether the ndk-build compilation environment exists:
Execute: ndk-build -v. If there is a version information prompt, it is successful. If not, refer to the following steps to configure the ndk-build compilation environment Execute: ndk-build -v. If there is a version information prompt, it is successful. If not, refer to the following steps to configure the ndk-build compilation environment
- Download android-ndk-r25c - Download android-ndk-r25c
https://dl.google.com/android/repository/android-ndk-r25c-linux.zip https://dl.google.com/android/repository/android-ndk-r25c-linux.zip
- Unzip and get the path /xxxx/android-ndk-r25c - Unzip and get the path /xxxx/android-ndk-r25c
- Set environment variables - Set environment variables
- Edit bash.bashrc file - Edit bash.bashrc file
sudo vi ~/.bashrc sudo vi ~/.bashrc
Add at the end of the file: export PATH=/xxxx/android-ndk-r25c:$PATH Add at the end of the file: export PATH=/xxxx/android-ndk-r25c:$PATH
- Update environment variables - Update environment variables
source ~/.bashrc source ~/.bashrc
- Check whether the environment has been successfully added - Check whether the environment has been successfully added
ndk-build --version shows version information ndk-build --version shows version information
# 2Linux Platform # 2 Linux Platform
**Linux compilation** toolchain dependency: **gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf**, download link: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/ **Linux compilation** toolchain dependency: **gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf**, download link: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/
## Linux toolchain configuration ## Linux toolchain configuration
1. Configure the cmake compilation environment: 1. Configure the cmake compilation environment:
1. Verify whether there is a cmake environment: 1. Verify whether there is a cmake environment:
cmake --version shows the cmake version is successful. If cmake does not exist, perform the following steps to configure the cmake environment cmake --version shows the cmake version is successful. If cmake does not exist, perform the following steps to configure the cmake environment
2. Install cmake 2. Install cmake
pip3 install cmake==3.16.3 pip3 install cmake==3.16.3
3. Verify that the installation is successful 3. Verify that the installation is successful
cmake --version cmake --version
Displaying the cmake version is successful Displaying the cmake version is successful
2. Configure the compilation toolchain 2. Configure the compilation toolchain
1. Download the toolchain 1. Download the toolchain
32-bithttps://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/ link 32-bithttps://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/ link
gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf.tar.xz gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf.tar.xz
64-bit: There is currently no 64-bit version, and it will not be added for the time being. If some customers use the corresponding version and did not add the toolchain path in time, please give feedback. 64-bit: There is currently no 64-bit version, and it will not be added for the time being. If some customers use the corresponding version and did not add the toolchain path in time, please give feedback.
2.arm-none-linux-gnueabihf install 2.arm-none-linux-gnueabihf install
a.Unzip it and place it in the folder you need a.Unzip it and place it in the folder you need
tar -xvJf ***.tar.xz tar -xvJf ***.tar.xz
b.Edit the bash.bashrc file b.Edit the bash.bashrc file
sudo vi ~/.bashrc sudo vi ~/.bashrc
c.Add environment variables c.Add environment variables
export PATH=path_to/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin:$PATH export PATH=path_to/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin:$PATH
d.update environment variables d.update environment variables
source ~/.bashrc source ~/.bashrc
e.Check if the environment is successfully joined e.Check if the environment is successfully joined
Execuearm-none-linux-gnueabihf-gcc -vView gcc 32bit version Execuearm-none-linux-gnueabihf-gcc -vView gcc 32bit version

View file

@ -4108,10 +4108,12 @@ inline double DistanceSqrd(const IntPoint &pt1, const IntPoint &pt2) {
double DistanceFromLineSqrd(const IntPoint &pt, const IntPoint &ln1, double DistanceFromLineSqrd(const IntPoint &pt, const IntPoint &ln1,
const IntPoint &ln2) { const IntPoint &ln2) {
// The equation of a line in general form (Ax + By + C = 0) // The equation of a line in general form is Ax + By + C = 0.
// given 2 points (x锟?y锟? & (x锟?y锟? is ... // Given two points (x1, y1) and (x2, y2):
//(y锟?- y锟?x + (x锟?- x锟?y + (y锟?- y锟?x锟?- (x锟?- x锟?y锟?= 0 // (y1 - y2)x + (x2 - x1)y + (y2x1 - x2y1) = 0
// A = (y锟?- y锟?; B = (x锟?- x锟?; C = (y锟?- y锟?x锟?- (x锟?- x锟?y锟? // perpendicular distance of point (x锟?y锟? = (Ax锟?+ By锟?+ C)/Sqrt(A锟?+ B锟? // so A = (y1 - y2), B = (x2 - x1), C = (y2x1 - x2y1).
// The perpendicular distance of point (x, y) is
// (Ax + By + C) / sqrt(A^2 + B^2).
// see http://en.wikipedia.org/wiki/Perpendicular_distance // see http://en.wikipedia.org/wiki/Perpendicular_distance
double A = double(ln1.Y - ln2.Y); double A = double(ln1.Y - ln2.Y);
double B = double(ln2.X - ln1.X); double B = double(ln2.X - ln1.X);
@ -4376,4 +4378,4 @@ std::ostream &operator<<(std::ostream &s, const Paths &p) {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
} // ClipperLib namespace } // ClipperLib namespace

View file

@ -60,7 +60,7 @@ example
| ----------------- | ------------------------------------------------------------ | | ----------------- | ------------------------------------------------------------ |
| model_path | onnx model path | | model_path | onnx model path |
| adla_toolkit_path | path to adla_toolkit | | adla_toolkit_path | path to adla_toolkit |
| target_platform | Specify target platform. for A311D2 : PRODUCT_PID0XA003。for S905X5: PRODUCT_PID0XA005 | | target_platform | Specify target platform. For A311D2: PRODUCT_PID0XA003. For S905X5: PRODUCT_PID0XA005 |