Jump to content

Mirrored blocks and extrusions


Recommended Posts

Hi,

 

For our bespoke AutoCAD plugin we can not use mirrored blocks or those with extrusions.

 

I know I can find mirrored blocks by quick selecting scales of less than 0, is there a similar way to select blocks with a negative extrusion?

 

Evem better would be a process (LisP?) to select all the blocks that are mirrored or have negative extrusions

 

Thanks

Link to comment
Share on other sites

Your thread is in the AutoCAD 2D Drafting forum but you speak of negative extrusions. When I see the word "extrusion" I think 3D. Just to be clear is this a 2D or 3D drawing?

Link to comment
Share on other sites

This is a 2D drawing.

 

Our plug in renders the drawing into a Java applet for web use. Mirrored blocks appear as rectangles rather than rendering. I fixe the neagtive blocks and sometime they still do not render. The only thing I can find at present is when I run a list command on them, they have a extusions, usually in the z direction, of -1, even though they are 2-d object.

 

As an aside if you know how this occurs and can be avoided in the first place this would also be useful!

 

leigh

Link to comment
Share on other sites

Once again you throw in a 3D term: rendering.

 

OK...I get the impression that a negative extrusion really means, in this case, that your geometry has an elevation that is less than 0.00 and you want to correct it. Is that right?

 

One option is to use the FLATTEN command if the above is true. Other options listed in this thread....

 

http://www.cadtutor.net/forum/showthread.php?63979-How-do-I-bring-the-Z-axis-on-survey-dwgs-to-zero&highlight=flatten

Link to comment
Share on other sites

Sorry, rendering maybe a bad word. Not 3d term here, just saying our plug in makes the drawing into a java applet.

 

I don't believe the geometry has any elevation., the only thing differentbetween these blocks is that when I run list on them is the data "Extrusion direction relative to UCS:" with a negative value.

 

I have attached an example. The only solution I have found is to manaully replace them (BLOCKREPLACE) retains this extrusion. I am hoping there is a quiker way to locate, and fix these.

Example01.dwg

Link to comment
Share on other sites

Yes, even 2D geometry has an elevation. The default is "0" unless someone intentionally or inadvertently moved it to something different.

 

Try the FLATTEN command on just one block and see what happens. Report the results back here.

Link to comment
Share on other sites

Hi Flatten does remove the extrusion relative to the UCS, but it renames the blocks, with suffix "-flat-X" where X is a number. This means if I have 30 of these chairs end up with 30 different blocks, rather than 1. And this only occurs if I do not remove hidden lines. If I choose remove hidden lines then it explodes the blocks and reduces them to their constituent parts.

Link to comment
Share on other sites

The DXF group codes 210, 220, and 230 hold the components of the extrusion vector. I believe the vector is always normalized (i.e., a length = 1) so a mirrored block would likely be filtered if a routine targeted 230 !=1.0.

 

 

 

To test the theory set up the FILTER dialog as shown. Does it correctly isolate the problem blockreferences?

Filter.jpg

Link to comment
Share on other sites

I would just like to be able to update all by blocks so these three values are 1, if there is a lisp or similar so I could do it with 1 click this would be perfect.

 

Leigh

Link to comment
Share on other sites

There may be some routine available, I don’t know for certain.

 

 

 

But, to clarify, which three values are in need of change? A standard WCS entity would have a Extrusion (Normal) vector of 0,0,1

 

 

 

I’ll assume everything in you drawing is coplanar to the WCS’s XY plane – just that some of the 2D references have erratic properties to get the correct 2D placement. If that is correct then I would suggest using that filter showed in my previous post to pre-select all references that are essentially “upside down”. Now, invoke the MIRROR3D command, choosing the “Delete original” option.

 

 

 

Conceivably, you would also like to ensure all scale values are 1.0. Using a new Filter, or the Quick Select feature of the Properties Pallet, select all references that have scales not equal to 1.0. All three X, Y,Z scales can then be reset to 1 in the properties pallet.

 

 

 

Unless the reference geometry is symmetrical, however, the item in question may change visually from their current orientation.

Link to comment
Share on other sites

I just need to reset the Extrusion (Normal) vector to 0,0,1. Everything is co-planar and just has some erratic properties which screws up external processes we run on the CAD plans.

 

How would I use the mirror3d? Currently the scale factors are all 1, and need to remain positive.

 

Sorry if this are foolish questions. I don't do any 3d work, so this is all abit new to me.

Edited by LeighJ
Link to comment
Share on other sites

Everything coplanar makes it a simple process. Use the filtering technique mentioned previously, and then start MIRROR3D. Due to the pre selection, only the upside down blocks will be mirrored.

 

 

 

During the command prompts, choose the XY option, pick any arbitrary point on the WCS XP plane, choose YES to delete source object.

 

 

 

The block reference will now have the correct Extrusion (Normal) direction, but will probably have a X scale of -1. Filter for that to reset to 1.

Link to comment
Share on other sites

If the block is asymetric wouldn't modifying the the extrusion vector from -1 to 1 have the affect of flipping the geometry? Essentially miroring the mirrored copy.

Link to comment
Share on other sites

I made a similar cautionary comment in the last line of post #12. Given certain setups, even that situation may be mitigated - by adding 180 degrees to the Rotation property.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks all, yes the blocks get flipped, but the problem blocks seem to be chairs 99% of the time and they are symmetrical so it doesn't causes me too much problems.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...