durgeshk Posted March 7, 2014 Share Posted March 7, 2014 Dear All, I have been facing this problem to the point that I have no idea where to look for help or advice. If you have a solution or suggestion to solve, i would be glad to hear. Thanks. I am trying to solid (white colour) hatch few objects. I plotted a sine curve using a lisp script. Using straight line + OSNAP i have created a close area between these two sine curves. When i try to apply hatch, it does not recognize the are bounded by the sine curves. A minimum working example can be found here: https://dl.dropboxusercontent.com/u/8222388/polyline_hatch_issue_MWE1.dwg Many thanks! Quote Link to comment Share on other sites More sharing options...
durgeshk Posted March 7, 2014 Author Share Posted March 7, 2014 or actually a minimum non-working example. Quote Link to comment Share on other sites More sharing options...
SEANT Posted March 8, 2014 Share Posted March 8, 2014 My AutoCAD setup chokes on that as well. That's a lot of geometrical data. In the attached, I used splines and was able to get a successful hatch operation. MWE2.dwg Quote Link to comment Share on other sites More sharing options...
Organic Posted March 8, 2014 Share Posted March 8, 2014 Hatching (using pick point) is often buggy is AutoCad. The better way to hatch when AutoCad can't find the closed shape (even though there is one) is to create the objects into a closed shape manually. I used pedit (polyline edit) to join the two 2d polylines [representing the spline cures) and the two straight lines you have drawn into one closed object. Then using hatch => s (for select objects) and selecting the closed object, it worked fine. Quote Link to comment Share on other sites More sharing options...
SEANT Posted March 8, 2014 Share Posted March 8, 2014 Hatching (using pick point) is often buggy is AutoCad. The better way to hatch when AutoCad can't find the closed shape (even though there is one) is to create the objects into a closed shape manually. I used pedit (polyline edit) to join the two 2d polylines [representing the spline cures) and the two straight lines you have drawn into one closed object. Then using hatch => s (for select objects) and selecting the closed object, it worked fine. An excellent point. That’s my own general workflow – I forgot to mention I did something similar in the file I uploaded. Instead of combining the Polylines with PEDIT, though, I used the REGION command. Regions assist the Island detection process, especially in high data content situations such as this. Perhaps my example file can serve as a secondary point; a Polyline is probably not the ideal entity to represent a Sine curve. The spline, which can be computationally taxing as well, does, at least, describe the curve in a much more efficient manner. After hatching both objects, the spline version is 112KB, the poly version is 836KB. Quote Link to comment Share on other sites More sharing options...
durgeshk Posted March 8, 2014 Author Share Posted March 8, 2014 Thanks a lot SEANT and Organic for helping. I still have a large number of data points after converting polyline to splines. But, their region was a 'light' object for the hatch command. SEANT:I exploded the region you had created. I noticed that the splines had fewer data points than what I got after PEDET (S) and then SPLINEEDIT. How did you mange to keep the Sine curve shape with fewer data points? And How did you remove data points (for eg. from 3000 points > 40 points) like you did? Quote Link to comment Share on other sites More sharing options...
SEANT Posted March 8, 2014 Share Posted March 8, 2014 I didn't actually remove the data points - I replaced the curve with a spline I already had on hand (See attached). I scaled it to match your poly, created the necessary copies, and then combined everything as a region. Due to the interpolation nature of splines they are often a better entity to use for complex curves. SinWaveSegment.dwg Quote Link to comment Share on other sites More sharing options...
durgeshk Posted March 8, 2014 Author Share Posted March 8, 2014 I am currently using the LISP script from: http://cadtips.cadalyst.com/curved-objects/sinusoidal-curve to make my sine curves. It seems you have a better way of making sine curves with fewer points. May I ask how you generated your sine spline? Thanks! Quote Link to comment Share on other sites More sharing options...
SEANT Posted March 8, 2014 Share Posted March 8, 2014 The process I used (there may be better methods out there) was somewhat convoluted. The entity is a rational NURBS curve, requiring Control Vertices with weights other than 1.0 The Control Vertices’ need repositioning to compensate for the higher weight. The process is kind of a pain in the butt. I haven’t bothered to do it again; it's easier to just keep the sample I posted above on hand. Quote Link to comment Share on other sites More sharing options...
durgeshk Posted March 8, 2014 Author Share Posted March 8, 2014 That's something I know nothing about. Thanks. 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.