surface trim problem

Next
 From:  Randy (RANDYGESKE)
4995.1 
Hi, I imported a STEP file of a golf club putter and noticed that a surface wasn’t trimming properly. The first snapshot is of the surface with the rest of the club shown before I retrim the hole for the shaft of the club. The second snapshot is the result when I try to trim this hole. How can I fix this? I’ve attached the 3dm file.





  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  coi (MARCO)
4995.2 In reply to 4995.1 
Hi Randy!

Those might be some display artifacts. Everything's fine here.



Cheers,
Marco
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Randy (RANDYGESKE)
4995.3 In reply to 4995.2 
Sorry if my post wasn’t complete. Now trim the surface to the outside lines, too. The problem occurs once both loops of edges are trimmed. Thanks for the quick response!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  coi (MARCO)
4995.4 In reply to 4995.3 
Ahh, i see! Yep..had similar results with the TRIM-command. But you could try the BOOLEAN MERGE, which seems to be working as expected..well, depending on what you are after. I selected the whole bunch and ran BOOLEAN MERGE.



Best,
Marco
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Randy (RANDYGESKE)
4995.5 In reply to 4995.4 
Awesome! Thanks, Marco. Do you know why trim couldn’t do the job? Is it because the circle edge is so close to the outer edge of the trimmed surface? I will make a note to always try Boolean Merge if trim doesn’t work. I expect I will be importing many models in the future. Any general guidelines for dealing with surface problems like this in the future? I don’t want to bother the forum about every little surface glitch I find. Thanks again!

Randy
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4995.6 In reply to 4995.5 
Hi Randy - so it looks like here Trim itself is actually ok and you're actually running into a bug in the display mesher that is making an incorrect display mesh for the trimmed result basically because of the very narrow clearance from the outer boundary to the inner hole.

If you do just a trim using your outer boundary of the file you posted, you can see that the result fragments look like this:



So note there that the bottom cut edge there has a slight amount of curvature to it, but it's not enough for the display mesher to add more points to it, so the display mesh uses a linearized boundary that's just a straight line there like so (the red line):



But that's a problem because you can see there that line is going to end up hitting the inner boundary and having outer and inner boundaries cross each other is bad and will mess up further steps in the display mesh generation. It won't be able to properly distinguish the outside and inside regions of the surface once those boundaries have crossed each other.

This is all happening in the creation of the display mesh and not in the actual real surface geometry operations that Trim had already calculated though.


If you try to repeat your trim with the attached file you should see that it does not do that anymore - the only difference in the attached file is that I added some points to the bottom curve so that it was made up of several spans instead of being just a single one-span bezier curve like it was before. That will then cause the display mesh to use several points along that bottom piece and then the linearized boundaries will not cross.

So anyway, it's a display mesher issue and not actually something going wrong with Trim - it's difficult to tell the difference though when this happens.

It's unfortunately pretty difficult for me to do much about it, because of the speed orientation of the display mesher. I could try to add code to the display mesher to analyze whether the outer and inner linearized boundaries were in a shallow area and needed more points to cross each other but that will be a fairly time intensive calculation to do and in 99.9999% of cases the end result of the calculation will be that it doesn't need to do any refinement. So it's kind of difficult to slow down mesh generation for all cases just to catch this particular kind of case...


But I do want to tune up the display mesher to try and make it add a couple more points in for things that are only shallowly curved but kind of stretch a fairly long ways across the particular shape - that would probably help with this situation.


Boolean merge happened to work in this case just because it ends up making a somewhat more complex edge curve for the bottom edge which has more spans in it, so it has more points in its initial linearized boundary for the display mesh generation.


Also one last note - on the original file that you posted, if you generate the messed up looking one but then go to actually do an export to a mesh format you should see that the export is not actually messed up itself, because there is an extra point added to the middle of the bottom edge in that case to slice the inner hole into 2 halves.


- Michael

EDITED: 8 Mar 2012 by MICHAEL GIBSON


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  coi (MARCO)
4995.7 In reply to 4995.5 
Hi again..

..well, an issue might be, that the circle(green) and the surface(red) are actually not on the same plane/level (check Top)..there's a tiny tiny gap..



I'm sure, that Michael will come up with some helpful explanations.

Cheers,
Marco(..upps..too late..:])
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4995.8 In reply to 4995.7 
Hi Marco,

> ..well, an issue might be, that the circle(green) and the
> surface(red) are actually not on the same plane/level (check
> Top)..there's a tiny tiny gap..

That's so tiny that I don't think it's the issue - check out the message just slightly above, I posted it at the same time you were writing your other post I think.

It definitely looks to me like a display mesh generation problem - the bottom edge is just slightly curved but the display mesh just puts a straight line on it and so the outer and inner boundaries end up crossing each other in generated display mesh and that then makes for the messed up display mesh appearance.

As far as I can tell the actual result of Trim in the NURBS geometry itself is all ok.

There's more explanation and some screenshots to illustrate above.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Randy (RANDYGESKE)
4995.9 In reply to 4995.8 
Thanks for bailing me out, Marco and Michael. I find the forums invaluable!

Randy
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All