Trimmed surfaces and their theory

Hello dear OpenCascade community,

this question is rather concerned with the theory of trimmed surfaces than their actual implementation, but since there are a bunch of smart people here, I dare to ask :)

Let's say we have a parametric surface whose parameters are u and v, and we want to trim this surface. Of course the easy way to do so is to restrict its parameters by defining minimum and maximum values in both parameters. Obviously this method restricts us to trimmed surfaces whose paramater bounds form a rectangle in their paramater space.

Now what if I want to trim the surface by an arbritrary shape? Say I have a rectangle and I want to trim a circle out from it so it becomes a rectangle with a hole. How would the restriction look like in the u-v space? I know that OpenCascade is capable of doing that, (I jhave used it to do so a couple of times), but I am curious about the theory behind. For example, I then want to compute the intersection of the surface and some curve, how do we decide if the intersection point is valid in our trimmed u-v space?

Probably I can check this somewhere in the source code, but if it is possible I would avoid the digging.

Thank you very much for the answer!

Sharjith Naramparambath's picture

Hi Laszlo,

This is where you have to add Topology to the Geometry. As far as parametric surfaces and curves are concerned, you are dealing with only geometry. You can represent curves and surfaces using analytical and parametric equations but when it comes to objects like say a flat patch with a hole in it, you cannot define it simply using geometric equations. That's where you have to define the data structure with all the elements that compose the flat patch and the hole along with their geometries, their limiting factors and connecting factors. That's topology. Now you would be no longer working on mere geometric classes but on topological data structures to define trimmed surfaces and other complex surfaces and solids. So I suggest you to read more about Topology in CAD and also the related documents in OCC. Hope this helps.

Regards,
Sharjith

Laszlo Kudela's picture

Dear Sharjith,

thank you for the explanation, you made it much clearer for me! I will also read some literature as you sugegsted!

Best regards
Laszlo