2017年2月22日星期三

What are AcDbCurve/Curve Parameters? ObjectARX/.NET

What are AcDbCurve/Curve Parameters? ObjectARX/.NET

By Philippe Leefsma
Please can you explain what Parameters are?
In simple terms, the parameter of a curve defines a 0-n floating point value indicating point positions on a curve.
Lets use a polyline as an example of what to expect from a parameter value.
If we have a polyline which has 5 points, and each of the 4 lines are different in length. If we call AcDbCurve::getStartParam() we will be returned a value of 0, if we call AcDbCurve::getEndParam() we will get a value of 4, if we extract the 2nd polyline point and call AcDbCurve::getParamAt() we will be returned a parameter value of 1. So you can see that in the case of a polyline, the parameter values directly represent each of the start and end points of the Polyline.
Parameters are very powerful, for instance, I can extract the halfway point between p1 and p2 by calling AcDbCurve::getPointAtParam(0.5) or the third of a distance between p3 and p4 by calling AcDbCurve::getPointAtParam(2.33333).
Another point to mention is that parameter values, although define a 0-n floating point value indicating point positions on a curve, are designed to best fit the needs of the curve being implemented. For example, the polyline example above uses parameter values as start and end point positions, this is a very efficient way to use parameters for a polyline and indeed makes logical sense, but for a circle the parameter values correspond to a radian increment around the circle. So, for a polyline the parameter value is non-uniform whereas the circle uses a uniform parameter value.

2017年1月14日星期六

ogr2ogr kml

 将kml文件转换为dxf文件

ogr2ogr -t_srs EPSG:2385 -f DXF lhk_fbd.dxf doc.kml

更新:以上方法会出错,不知道原因
01 未解决
02 多出的字段是因为libkml
03 OGR_SKIP

ogrinfo -al --config OGR_SKIP LIBKML  qyl.kml

ogr2ogr   --config OGR_SKIP LIBKML  -t_srs EPSG:2436 -f DXF qyl.dxf qyl.kml


2017年1月12日星期四

msys2 cgal

 $ pacman -Qe

mingw-w64-x86_64-cgal 4.9-1
mingw-w64-x86_64-cmake 3.7.0-1
mingw-w64-x86_64-freeglut 3.0.0-4
mingw-w64-x86_64-gcc 6.2.0-2
mingw-w64-x86_64-make 4.1.2351.a80a8b8-1
mingw-w64-x86_64-mesa 13.0.2-1
mingw-w64-x86_64-qt-creator 4.1.0-1
mingw-w64-x86_64-qt5 5.6.2-4


cmake -G "MinGW Makefiles"   -DCMAKE_MAKE_PROGRAM=mingw32-make  .

 "C:\msys64\home\li\examples\Core\CMakeFiles\delaunay.dir\flags.make"
CXX_DEFINES = -DCGAL_Core_EXPORTS -DCGAL_USE_GMP -DCGAL_USE_MPFR 

2017年1月1日星期日

brew with a socks5 proxy

brew with a socks5 proxy

set a socks proxy with git for the http transport
git config --global http.proxy 'socks5://127.0.0.1:1081'
set a socks proxy for curl: just add proxy=socks5://127.0.0.1:1081 to ~/.curlrc.