Lee Mac Posted August 14, 2014 Share Posted August 14, 2014 Hi. Can i say that autolisp dont respect ucs at all and commands respect ucs by all means,? Certain AutoLISP functions perform calculations relative to the current UCS, for example, inters. Quote Link to comment Share on other sites More sharing options...
samifox Posted August 14, 2014 Author Share Posted August 14, 2014 If autolisp aknowladge ucs why the translstion is still required? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 14, 2014 Share Posted August 14, 2014 If autolisp aknowladge ucs why the translstion is still required? Not all AutoLISP operations are performed relative to the active UCS. Quote Link to comment Share on other sites More sharing options...
samifox Posted August 14, 2014 Author Share Posted August 14, 2014 Is there any reason? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 14, 2014 Share Posted August 14, 2014 From here: To save space in the drawing database (and in the DXF file), the points associated with each entity are expressed in terms of the entity's own object coordinate system (OCS). With OCS, the only additional information needed to describe the entity's position in 3D space are the 3D vector describing the Z axis of the OCS and the elevation value. Quote Link to comment Share on other sites More sharing options...
samifox Posted August 16, 2014 Author Share Posted August 16, 2014 as far as i know DXF are codes, now its being treated as a file? is it the DWG or part of it? Quote Link to comment Share on other sites More sharing options...
samifox Posted August 16, 2014 Author Share Posted August 16, 2014 Hi the doc say about UCS User coordinate system—the working coordinate system. The user specifies a UCS to make drawing tasks easier. All points passed to AutoCAD commands, including those returned from AutoLISP routines and external functions, are points in the current UCS (unless the user precedes them with a * at the Command prompt). If you want your application to send coordinates in the WCS, OCS, or DCS to AutoCAD commands, you must first convert them to the UCS by calling the trans function. this expression (entmake (list (cons 0 "CIRCLE") ;*** (cons 6 "BYLAYER") (cons 8 "0") (cons 10 (list 0.0 0.0 0.0)1 0) ;*** (cons 39 0.0) (cons 40 1.0) ;*** (cons 62 256) (cons 210 (list 0.0 0.0 1.0)))) will draw the circle on WCS origin ragedless of the active UCS how come? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 16, 2014 Share Posted August 16, 2014 as far as i know DXF are codes, now its being treated as a file? is it the DWG or part of it? AutoCAD DXF this expression (entmake (list (cons 0 "CIRCLE") ;*** (cons 6 "BYLAYER") (cons 8 "0") (cons 10 (list 0.0 0.0 0.0)1 0) ;*** (cons 39 0.0) (cons 40 1.0) ;*** (cons 62 256) (cons 210 (list 0.0 0.0 1.0)))) will draw the circle on WCS origin ragedless of the active UCS how come? The expression as it stands will error as a result of this line: (cons 10 (list 0.0 0.0 0.0)1 0) Assuming the trailing 1 & 0 are removed, the circle will always be constructed at the WCS origin since the OCS origin = WCS origin, regardless of the active UCS. You already know this from your thread here. Quote Link to comment Share on other sites More sharing options...
samifox Posted August 16, 2014 Author Share Posted August 16, 2014 AutoCAD DXF The expression as it stands will error as a result of this line: (cons 10 (list 0.0 0.0 0.0)1 0) Assuming the trailing 1 & 0 are removed, the circle will always be constructed at the WCS origin since the OCS origin = WCS origin, regardless of the active UCS. You already know this from your thread here. Hi is the DXF is stands for a file format, DXF data structure is embedded into DWG, right? User coordinate system—the working coordinate system. The user specifies a UCS to make drawing tasks easier. All points passed to AutoCAD commands, including those returned from AutoLISP routines and external functions, are points in the current UCS (unless the user precedes them with a * at the Command prompt). If you want your application to send coordinates in the WCS, OCS, or DCS to AutoCAD commands, you must first convert them to the UCS by calling the trans function. why drawing database and DXF file are treated as two separate things? as marked with bold, the guide claim all autolisp expressions returned points in UCS while in my case entmake ignores UCS Quote Link to comment Share on other sites More sharing options...
samifox Posted August 21, 2014 Author Share Posted August 21, 2014 Hay everyone Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.