Community
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"chris" <
href="mailto:520054200047-0001@t-online.de">520054200047-0001@t-online.de>
wrote in message
href="news:EE2F0B075F0E8691755BE02CD3F7101B@in.WebX.maYIadrTaRb">news:EE2F0B075F0E8691755BE02CD3F......
i draw a line like it is show in the codesamples
from autodesk.
ads_point pt1, pt2;
if ((retval =
acedGetPoint(NULL, "select a point:", pt1)) != RTNORM)
if ((retval =
acedGetPoint(pt1, LoadMyResourceString(IDS_STRING106), pt2)) ==
RTNORM)
// create
the line
AcDbLine* pLine = new
AcDbLine(asPnt3d(pt1), asPnt3d(pt2));
this works fine with the wcs, but if the ucs is
moved or rotated
then the lines appear somewhere els.
do i have to translate all points? and how it is
done?
regards
chris
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Fernando Malard" <
href="mailto:fpmalard@hotmail.com">fpmalard@hotmail.com> schrieb im
Newsbeitrag
href="news:8A09E41BC29606EB7AAFAA5FF4F59A07@in.WebX.maYIadrTaRb">news:8A09E41BC29606EB7AAFAA5FF4F......
chris,
acedGetPoint() allways return the point on
UCS.
In other hand, when you create a line its points
passed to the constructor are expected to be on WCS.
So, you must convert from UCS to
WCS.
When your current UCS is the WCS everything works
fine because they are identical.
Use acedTrans() to do that. (Chapter 10 -
Coordinate System Transformations)
Regards,
Fernando.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"chris" <
href="mailto:520054200047-0001@t-online.de">520054200047-0001@t-online.de>
wrote in message
href="news:EE2F0B075F0E8691755BE02CD3F7101B@in.WebX.maYIadrTaRb">news:EE2F0B075F0E8691755BE02CD......
i draw a line like it is show in the
codesamples from autodesk.
ads_point pt1, pt2;
if ((retval =
acedGetPoint(NULL, "select a point:", pt1)) != RTNORM)
if ((retval =
acedGetPoint(pt1, LoadMyResourceString(IDS_STRING106), pt2)) ==
RTNORM)
// create
the line
AcDbLine* pLine = new
AcDbLine(asPnt3d(pt1), asPnt3d(pt2));
this works fine with the wcs, but if the ucs is
moved or rotated
then the lines appear somewhere
els.
do i have to translate all points? and how it
is done?
regards
chris
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"chris" <
href="mailto:520054200047-0001@t-online.de">520054200047-0001@t-online.de>
wrote in message
href="news:A7A13F32C003FEBDFB4B1F294C3C68E4@in.WebX.maYIadrTaRb">news:A7A13F32C003FEBDFB4B1F294C3......
hi fernando,
thanks for answering me, but it seems to be
complicated to switch around between
the coordinatesystems. how is the best way to
handle this?
always to transform the points to the
wcs?
do i have to transform back from wcs to ucs in a
case?
which case could that be?
regards,
chris
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Fernando Malard" <
href="mailto:fpmalard@hotmail.com">fpmalard@hotmail.com> schrieb im
Newsbeitrag
href="news:8A09E41BC29606EB7AAFAA5FF4F59A07@in.WebX.maYIadrTaRb">news:8A09E41BC29606EB7AAFAA5FF......
chris,
acedGetPoint() allways return the point on
UCS.
In other hand, when you create a line its
points passed to the constructor are expected to be on WCS.
So, you must convert from UCS to
WCS.
When your current UCS is the WCS everything
works fine because they are identical.
Use acedTrans() to do that. (Chapter 10 -
Coordinate System Transformations)
Regards,
Fernando.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"chris" <
href="mailto:520054200047-0001@t-online.de">520054200047-0001@t-online.de>
wrote in message
href="news:EE2F0B075F0E8691755BE02CD3F7101B@in.WebX.maYIadrTaRb">news:EE2F0B075F0E8691755BE02......
i draw a line like it is show in the
codesamples from autodesk.
ads_point pt1, pt2;
if ((retval =
acedGetPoint(NULL, "select a point:", pt1)) != RTNORM)
if ((retval =
acedGetPoint(pt1, LoadMyResourceString(IDS_STRING106), pt2)) ==
RTNORM)
// create
the line
AcDbLine* pLine = new
AcDbLine(asPnt3d(pt1), asPnt3d(pt2));
this works fine with the wcs, but if the ucs
is moved or rotated
then the lines appear somewhere
els.
do i have to translate all points? and how it
is done?
regards
chris