CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > CAD Software > Autodesk Software (Autocad, Inventor etc)


Autodesk Software (Autocad, Inventor etc) Discuss Autodesk Software (Autocad, Inventor etc) software here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 08-17-2011, 02:03 AM
 
Join Date: Dec 2008
Location: usa
Posts: 1,849
BurrMan is on a distinguished road
Help Ger21

Looking for input on a dxf file... I think Ger21 is an Autocad user??

I am trying to help a user with an import problem.

I believe a file has been presented with a mismatch in the units specified in a dxf..

I will preface this with I expect you understand that dxf file is unit independant and then units are specified within the format... Therefore, everything is drawn as a "UNIT" and goes from there.. One must no the unit for this answer.

Here is a file attached. I believe that the originating natural unit in the file, is something other than the $INSUNITS =4 specified, which is causing a scaling on import...

I have found some discussion of others regarding how to determine what the native, drawn unit is versus the INSUNIT variable, but couldnt find any definitive method from other autocad users.

My question is do you know how to determine in AutoCad the 2 unit values and if they match??? (The actual drawn unit and the insunit value)

I'm pretty sure it is a mismatch because during import, I can set my system units to a custom value of 1 unit = 25.4 units and everything comes in ok with no scaling.. The file is supposed to be mm (The set insunits value) but when being brought in to a metric system, the geometry is scaled... So my contention is that the native, drawn unit is inch and an INSUNITS value of MM has been applied. (Drawing started and performed in inches and changed for export.

The dxf file I believe was created with qcad, which uses the dxflib to create the files, but was hoping that something in Autocad can make this determination, or that maybe you knew the dxf format enough in a text editor, that you could determine the actual entity's unit to be mismatched with the insunits #4 setting..

Any help is appreciated.
Burr
Attached Files
File Type: zip BOBCAD Toolpath Problem.zip‎ (4.0 KB, 42 views)
Reply With Quote

  #2  
Old 08-17-2011, 07:04 AM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,442
ger21 is on a distinguished road
Buy me a Beer?

I looked through the .dxf reference manual, and here's what I see.

$INSUNITS is used when inserting a block or other object into a drawing (in AutoCAD). It shouldn't be used to determine the drawings units, as that's not what it's for.

I just spent about 30 minutes researching this, and I don't see anything in the .dxf file that specifically states the units used.

I just realized that there really is no unit setting in AutoCAD. You can only set the units for inserted objects ($INSUNITS). I had previously mistakenly believed that this was a unit setting, but never read the description closely enough to actually understand what it is.

There is a setting to determine imperial or metric, but it's not unit specific.
$MEASUREMENT
0 = imperial
1 = metric

AutoCAD let's you specify the type of units, but not the actual units.
Types are:
Architectural
Decimal
Fraction
Scientific
Engineering

I've used a .dxf to machine code program in the past that would automatically assume mm's if entities wer larger than a specified size. But this was for large woodworking machines, where you could say that any size over 200 was automatically mm's.

Imo, when a .dxf is imported, no scaling should ever be applied. Things would be much simpler. Unfortunately, scaling is pretty common it seems, and it usually causes problems.

Does this help?
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #3  
Old 08-17-2011, 07:53 AM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,442
ger21 is on a distinguished road
Buy me a Beer?

A little more info, as I may not have answered any questions.



I expect you understand that dxf file is unit independant and then units are specified within the format... Therefore, everything is drawn as a "UNIT" and goes from there.. One must no the unit for this answer.
This really answers the question for you.


My question is do you know how to determine in AutoCad the 2 unit values and if they match??? (The actual drawn unit and the insunit value)
You can't. A .dxf file doesn't contain the actual drawing units used.


So my contention is that the native, drawn unit is inch and an INSUNITS value of MM has been applied. (Drawing started and performed in inches and changed for export.
Per my previous post, this may be possible. Again, AutoCAD is unitless, but assume you draw it assuming the units to be inches. You can set the insunits in autocad to be mm's, and this is saved in the .dxf.
So it's possible that it scales based on this variable.

To know for sure what's going on, I'd need to spend a few hours testing.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #4   Ban this user!
Old 08-17-2011, 02:15 PM
 
Join Date: Dec 2008
Location: usa
Posts: 1,849
BurrMan is on a distinguished road

Hi Ger,
Thanks for the response..

It does answer at least what i was looking for.. It kindof confirms it, but not definitivly..

Yes, autocad draws unit independent. 1 unit is one unit... though it has flags for unit input...

The info I found was that you can start an autocad file in a "unit of measure" to begin work. Like imperial or metric. Then you can "set the units" with the INSUNITS. This doesnt scale the entities, just flags 1 unit is now 25.4 if the drawing was begun (or nativley created) in inches.. A dxf file is a unit independent format also, with the flags mentioned... The measure flag would be indicating that the drawing was of a unit system, then flags for inserts for other inputs, like when working in inches, you can just type the unit at input and draw with different units.. (Working in inches, you can type "20mm" and the units will be drawn accordingly... This is the INSUNITS flag on entities)

I can produce predictable results by assumming the file was a native inch unit with the INSUNITS flag applied, hence the scaling issue for the user.

Thanks for your help with the file. Dont spend too much time on the file. I just dont have autocad or advanced autocad UI knowledge and was hoping that you knew of some sort of report on the files info, that would present this data somehow....
Reply With Quote

  #5  
Old 08-17-2011, 03:57 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,442
ger21 is on a distinguished road
Buy me a Beer?

Then you can "set the units" with the INSUNITS.
As I said, that's not what I interpret INSUNITS use is. The ACAD manual says:

Specifies a drawing-units value for automatic scaling of blocks, images, or xrefs inserted or attached to a drawing
But I don't really understand exactly how it's used, and different apps might be using it differently.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 08-17-2011, 04:57 PM
 
Join Date: Dec 2008
Location: usa
Posts: 1,849
BurrMan is on a distinguished road

I am interpreting it as this...

If I open package with something like an imperial template, or units measure is set to inches, then I add some type of entity, by typing in 3M or 3MM, or also, now change the drawing units to mm, then the insunits is applied to that area (Allowing several units to be entered for drawing in a single file, like "1 Mile, then one meter, then 2 inches). The originating UNITs value of entry is still at a scale of the drawing, but the insunits scales individual inserts with different values appropriately.. Hence multi unit entry in a single file.

Thanks for the help. I do know what is set in the file.. I just needed someone competent in Autocad to help me determine if the system can specify the mismatch (Or better said, the original intent unit, vs the INSUNITS variable)

This just needs to be known and follow the file, or a determination needs to be made using a predictable method.. Easy enough in this file.. The originating unit is 1 unit = 1 inch with a scale of 25.4 applied. All results are predictably pointing to this.

Thanks again.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 03:50 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361