How to force trim to always pull curves to its surface?

Why not blend curves from the surface edges? Then surface from edge curves, surface match preserve isocurve direction.

I often use this workaround, however, it works properly only on flat surfaces. Extending the side edge of a double curved surface sometimes won’t guarantee that the snapped handle of “Blend surface” will translate to a G1 or G2 continuity. “Match surface” sometimes helps, but in certain cases (like the one I pictured above) it won’t. This is why sometimes I’m forced to use blend curves followed by “Sweep 2 rails” and “Match surface”.

Have you tried whether my proposed solution works on your model? :slight_smile:

Thanks , It works fine for me

In theory it should at least match G1 if you extend the edge linearly

I agree, on theory it should, but I noticed that in many occasions the continuity between side edges on double curved surfaces was not even G1, even though the continuity between surfaces was G2. In this case I had to use curve blend and match the blend surface to it.

OK so now you have revealed the real problem - offsetting polysurfaces.

personally I avoid OffsetSrf on joined surfaces precisely because it produces this sort of garbage. In my opinion it doesn’t save any time if you have to deal with fixing all the problems it creates. Better to explode the polysurface and offset and then do whatever extending and trimming needed manually… that way i end up with a nice clean result.

If your surfaces are designed well with good G1 continuity the offset will join nicely anyway. If there are places the offset surfaces don’t join that indicates there was less than G1 continuity on those edges.

No, the real problem is that Rhino does not trim at the proper place like where the trimming curve or surface intersects with the surface to be trimmed. Once the tolerance is temporarily changed to a greater number, the trim works as it should.

The offset surface from my file was just an example where the “Trim” and “Split” tools fail. These tools will also fail with a regular plane withing the same conditions.

As for the “Offset surface” tool, it regularly fails with no reason, despite the original model having perfect G2 continuity between the joined surfaces (using “Blend surface”, or “Sweep 2 rails” followed by “Match surface” with “Refine match” 0.001 mm and 0.1 degree curvature). Having G1 or G2 will not guarantee trouble-free offset polysurface since the command uses approximation with a certain amount of deviation rather than a mathematically exact offset. “Network surface” also uses similar approximation. This leads to some corner edges that don’t match the corresponding edges of the adjacent surfaces and Rhino reports them as “Out of tolerance”.
Also, in certain cases where G1 or G2 is involved, some offset surfaces have completely different shape than the input geometry. This is especially true where “Fillet edges” or “Blend edges” were used. Even a perfect closed G2 blend surface with nicely distributed control points gets split into a number of offset surfaces whose outside edges suddenly change direction where the blend surface fills the space between G1 fillets. I fully understand that, because Rhino tries to use normal direction as a boundary limit for the offset surface creation. However, I have seen many occasions where these split surfaces simply don’t share even G0 along their outside edges.

Take this, for example. Build a blend surface between both extrudes profiles (absolute tolerance 0.001 mm, angle tolerance 0.1 degrees), then check their continuity. Two edges will be G2, the rest two will be G1. Then make offset surfaces of them at 1 mm or 2 mm. then check the continuity between outside edges. It will be G0 on all 4 of them. I can’t find a better example where the edges were out of tolerance, but if I face the same issue again I will upload it here.
Offset surface G0.3dm (146.9 KB)

Sure but the probability of it happening is greatly increased if
you use offsetsrf on joined surfaces

If you have perfect G2 continuity then select the polysrf and do this :
:
Explode offsetSrf
sellast copyclip
undo paste join

I didn’t say it would. I said if you have good G1 continuity you can just offset the individual surfaces and then join the result.

These are also commands I never use precisely because they produce surfaces that do not have good G! continuity. If you make the fillets with filletSrf you won’t have problems with getting the offsetsrf to join.

There is no need for me to look at your example, I am well aware of the problem you are talking about. I avoid those problems by using filletsrf whenever possible.

There is a reason for me to use “Pipe” to cut the corners and fill the space with “Blend surface” instead (mostly G2, but sometimes G1 is also useful). I also use “Fillet surface”, and rarely rely on “Fillet edges” or “Blend edges”. But even when I use “Blend surface” and “Fillet surface”, the “Offset surface” tool sometimes creates very tiny new edges or split edges that cause issues. Sorry to say, but “Fillet surface” won’t solve the problem in some occasions. Maybe your kind of models are less complex, or I’m still a rookie Rhino user. :slight_smile:

I just tried your suggested macro
“Explode offsetSrf
sellast copyclip
undo paste join”
but it also failed to produce proper offset surface despite the joined input surfaces being G1 at either end. I also tried “Rebuild edges” on all input surfaces, then I joined them, verified the continuity again with the “! _GCon” command, then ran your macro and the end result was two offset surfaces that also had G1 at either side. However, after joining of the offset surfaces, one of the edges remained G1, while the opposite one became out of tolerance.
By the way, your macro does crazy things if I use it as a button macro. :slight_smile: The viewport basically freezes and the selected surfaces flash rapidly unless I hit the Esc key. Only copy/paste of the script works.

Doing offset surface on joined surfaces produces a bit different results than doing so on separate surfaces. However, both ways produce some errors in different locations of the models. Since the “Offset surface” command uses approximation based on user-set tolerance, I could imagine that if one of the offset surfaces get a slight deviation in a positive number withing the tolerance, and the adjacent offset surface has an exact or negative number, their shared edge(s) will be at such a distance that “Join” will fail. I regularly check the distance between offset surfaces and they are rarely exact numbers like the ones I used as an input.

Lastly, “Fillet surface” can’t help with automotive surfacing, because it’s just a G1, degree 2 surface that obviously lacks the required curvature and degree to be used for smooth free-form shapes of fenders, bumpers, engine covers etc.

If the offset surfaces don’t join then it does not have good G1 continuity.
Both Fillertsrf and OffsetSrf used on individual surfaces are extremely accurate.
If you make clean well constructed surfaces connected by fillets made with filletSrf you can often use the loose option in offsetsrf and get clean offset surfaces that have as good continuity and are as simple as the original.

Here is an example using the file from your previous post. I made the blend using filletsrf. If you offset the red surfaces using the loose=Yes option it will produce an accurate result
Offset surface G0X.3dm (182.0 KB)

The best way to test for good continuity is to offset the individual surfaces and see if they join. If the offset surfaces don’t join that tells you where there is poor continuity in the original surfaces

That is mostly not true. The simple fact is that you can’t make a piece of stamped painted metal and have it come out with G1 continuity. Even if the CAD model is G0 at a seam when the physical part is made that will be G2. The metal stamping process won’t produce a perfectly sharp crease and adding paint will further smooth out the transition. You won’t find a G1 transition on a automotive fender for the simple reason that the manufacturing process cannot create G1 transition.

You miss the point here. There are no fillet edges in automotive surfacing, other than to make the outside corners smooth along the border of the body panel. Very small corners along crease lines are also sometimes G1, but that’s when the radius is just 2-3 mm (2 mm radius is the required minimum in the automotive industry; a car won’t be road legal if it has too sharp edges). Everything else is made via free-form shapes that must have a very smooth flow, which means it can’t be just G1.

Your red surface is not a “Blend surface”. It has G1 continuity and is very different than what Rhino’s “Blend surface” with G2 produces. Also, I used this example, because it’s very simple (relatively straight extrusions with degree 2 and fixed radius 1 mm), yet it still produces improper edge align of the offset surface after using “Blend surface” with G2 continuity. Working with free-form surfaces with degree 3 or 5 with double curvature without fixed radius requires totally different approach. :slight_smile:

As for your explanation of G1 and G0 in automotive manufacturing, I have totally different experience with actual moulds and body parts. The K factor of bent sheets can’t hide the imperfections of a poorly made NURBS model of a car panel with G1 transition between main surfaces. The shiny paint will immediately reveal the issues.

I’m explaining to you why you are having problems in Rhino with the tools you are using.
If your complaints about the Rhino tools you are using is not the point then what is your point?

I have done modeling work for all the major auto companies that manufacture in the US over the last 25 years and have yet to see a part that required anything better than G1 continuity. From my experience I would say the average automotive engineer doesn’t know or care about G2 continuity.

Yes, but you claimed it would not offset accurately
if the surface was made using filletsrf. I was showing you your claim was false

As I said before I already know that without looking at your file. The problem you are having come from using blendsrf and filletedge and using offsetSrf on joined surfaces. Those commands do not produce good G1 continuity and that can be a huge problem. If you use those tools I expect you will have the problems you are having.

But don’t try to claim that offsetsrf on unjoined surfaces and filletsrf are inaccurate and will have those same problems. That claim will get you an argument every time. Those are 2 commands in Rhino that will consistently produce better tangent continuity than much more expensive CAD programs do.

If you don’t want to use those tools that’s OK with me, but don’t
tell me they will cause the same problems you are having

Not sure why you say that anything better than G1 is not required in the automotive industry… I already mentioned a few times that I do NURBS surfacing on car body panels. There is a good reason for using G2, G3 and more (some car designers use up to G7 for smoother flow), along with validation tools such like Zebra stripes and various curvature analysis tools.
On the other hand, now you mention “average automotive engineer”. There is a huge difference between car body design and engineering design of internal (non seen from outside) areas of the body, which is best known as body-in-white (or BIW). Body-in-white structures don’t need to feature beautiful reflections, hence it’s enough for them to be just G1. The latter also allows for very quick and convenient modifications to be made later in the engineering design process.

I agree with you that average engineers (non car designers) usually don’t care about G2 as their job is not to provide exterior design. Mechanical design is different.

You have to be more careful while reading my posts. I claimed that the blend surface with G2 will fail with offset and I proved it. You can also try it and see it with your eyes on your own screen. Instead, you decided to build a completely different shape with G1, and this proves nothing. I will repeat that this is a very basic scenario with two simple degree 2 extrusions with fixed radius. I work on car body panels with double curved surfaces with complex shape, degree 3 or 5, and G2 match to the adjacent surfaces (usually 4 sides). Rhino fails a lot more with double curved surfaces, no matter if they are joined or not.

I love when some monsters start a fight, they drop a lot of information haha

2 Likes

Wow, that was funny. Where are the monsters? I’m a rookie. :smiley:

for someone who work in the toy industry, someone who work in the automotive industry is a monster, I bet you have to pay more attention to small details and tech aspect, leading you to a complex knowledge.

learning learning learning monstrously…

I had already saved a link to this thread. Spot on. :grinning:

// Rolf

1 Like

No wonder why cars design has lost it’s edge… :stuck_out_tongue_winking_eye:
(Have you seen the new Land Rover Defender? They managed to even smooth out that one… The last car in the industy with personality and attitude. My heart is weeping today, so I couldn’t resist…)

That part I have always agreed…

The part you got wrong is the reason it fails
The reason offsetting individual surfaces fails to join is because the surfaces do not have good tangent continuity. If the surfaces that you are offsetting have good tangent continuity then the individual offset surfaces will also join

That is why offsetting the unjoined surfaces and seeing if the offsets join is an easy quick way to check if your surfaces have tangent continuity.