Subdivision-based surface editor
Surface editing is performed in typical computer-aided design (CAD) software products by using special tools to edit special surfaces, such as b-splines or subdivision surfaces. It is recognized herein that current approaches to editing surfaces are not generally applicable. For example, common CAD and surface modeling software products are tailored to a specific surface type or vendor specific format, or otherwise are not generally applicable to given analytical and non-analytical surfaces. In various embodiments described herein, subdivision surfaces can be generated to represent any surface. Further, surfaces can be manipulated using a control cage associated with the subdivision surface.
1 . A method comprising:
obtaining a model of an object, the model defining one or more surfaces;
generating a b-spline approximation associated with a specific surface of the one or more surfaces, the b-spline approximation defining a uniform bi-cubic, b-spline approximation;
based on the b-spline approximation, extracting a control cage for the specific surface, the control cage defining control points connected together so as to define a shape representative of the specific surface, the shape configured to change when at least one of the control points is moved in space;
subdividing the control cage so as to generate a subdivision surface representative of the specific surface of the model;
before generating the b-spline approximation, determining that the specific surface has a surface type that defines a plane, cylinder, sphere, cone, torus, mesh, or b-spline; and
when the surface type defines the plane, cylinder, sphere, cone, torus, mesh, or b-spline, generating the uniform bi-cubic, b-spline approximation based on the surface type of the specific surface.
2 . The method of claim 1 , the method further comprising:
replacing the specific surface with the subdivision surface, so as to define a new model of the object, the new model comprising the subdivision surface.
3 . The method of claim 2 , the method further comprising:
responsive to a manipulation of at least one control point, generating a new shape representative of the specific surface, wherein the subdivision surface of the new model represents the new shape.
4 . The method further of claim 3 , the method further comprising:
converting the new model into machine-executable instructions; and
executing the instructions by a 3D printer, wherein executing the instructions comprises:
printing the object represented by the new model having the subdivision surface.
5 . The method of claim 1 , wherein extracting the control cage for the specific surface further comprises:
generating a cross-section control cage for a cross-section shape that is defined by a cross-section of the specific surface; and
sweeping the cross-section control cage from a first end of the specific surface to a second end of the specific surface that is opposite the first end of the specific surface.
6 . The method of claim 5 , wherein the cross-section shape defines dimensions in a first direction and a second direction that is substantially perpendicular to the first direction, and the sweeping of the cross-section control cage further comprises sweeping the cross-section control cage along a third direction that is substantially perpendicular to both the first and second directions.
7 . The method of claim 5 , wherein sweeping the cross-section control cage further comprises sweeping the cross-section control cage about an axis that is substantially perpendicular to a direction along which the first and second ends of the specific surface are spaced apart from each other.
8 . The method of claim 1 , wherein extracting the control cage for the specific surface further comprises:
generating a cross-section control cage for a cross section shape that is defined by a cross-section of the specific surface, the cross-section control cage defining a plurality of vertices;
based on the surface type of the specific surface, constructing a bounding area around the cross section of the specific surface, the bounding area intersecting at least one of the plurality of vertices of the cross-section control cage; and
sweeping the bounding area from a first end of the specific surface to a second end of the specific surface that is opposite the first end of the specific surface.
9 . The method of claim 1 , wherein a face of the model includes the specific surface, the face further defining boundaries that surround the specific surface, the method further comprising:
trimming the subdivision surface such that the boundaries defined by the face contain the subdivision surface.
10 . A computing system comprising:
a processor; and
a memory storing instructions that, when executed by the processor, configure the system to:
obtain a model of an object, the model defining one or more surfaces;
generate a b-spline approximation associated with a specific surface of the one or more surfaces, the b-spline approximation defining a uniform bi-cubic, b-spline approximation;
based on the b-spline approximation, extract a control cage for the specific surface, the control cage defining control points connected together so as to define a shape representative of the specific surface, the shape configured to change when at least one of the control points is moved in space;
subdivide the control cage so as to generate a subdivision surface representative of the specific surface of the model;
before generating the b-spline approximation, determine that the specific surface has a surface type that defines a plane, cylinder, sphere, cone, torus, mesh, or b-spline; and
when the surface type defines the plane, cylinder, sphere, cone, torus, mesh, or b-spline, generate the uniform bi-cubic, b-spline approximation based on the surface type of the specific surface.
11 . The computing system of claim 10 , the memory further storing instructions that further configure the system to:
replace the specific surface with the subdivision surface, so as to define a new model of the object, the new model comprising the subdivision surface.
12 . The computing system of claim 11 , the memory further storing instructions that further configure the system to:
responsive to a manipulation of at least one control point, generate a new shape representative of the specific surface, wherein the subdivision surface of the new model represents the new shape.
13 . The computing system of claim 10 , the memory further storing instructions that further configure the system to:
generate a cross-section control cage for a cross-section shape that is defined by a cross-section of the specific surface; and
sweep the cross-section control cage from a first end of the specific surface to a second end of the specific surface that is opposite the first end of the specific surface.
14 . The computing system of claim 13 , wherein the cross-section shape defines dimensions in a first direction and a second direction that is substantially perpendicular to the first direction, the memory further storing instructions that further configure the system to:
sweep the cross-section control cage along a third direction that is substantially perpendicular to both the first and second directions.
15 . The computing system of claim 13 , the memory further storing instructions that further configure the system to:
sweep the cross-section control cage about an axis that is substantially perpendicular to a direction along which the first and second ends of the specific surface are spaced apart from each other.
16 . The computing system of claim 10 , the memory further storing instructions that further configure the system to:
generate a cross-section control cage for a cross section shape that is defined by a cross-section of the specific surface, the cross-section control cage defining a plurality of vertices;
based on a surface type of the specific surface, construct a bounding area around the cross section of the specific surface, the bounding area intersecting at least one of the plurality of vertices of the cross-section control cage; and
sweep the bounding area from a first end of the specific surface to a second end of the specific surface that is opposite the first end of the specific surface.
17 . The computing system of claim 10 , wherein a face of the model includes the specific surface, the face further defining boundaries that surround the specific surface, the memory further storing instructions that further configure the system to:
trim the subdivision surface such that the boundaries defined by the face contain the subdivision surface.
18 . A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to:
obtain a model of an object, the model defining one or more surfaces;
generate a uniform, bi-cubic, b-spline approximation associated with a specific surface of the one or more surfaces;
based on the uniform, bi-cubic, b-spline approximation, extract a control cage for the specific surface, the control cage defining control points connected together so as to define a shape representative of the specific surface, the shape configured to change when at least one of the control points is moved in space;
subdivide the control cage so as to generate a subdivision surface representative of the specific surface of the model;
before generating the b-spline approximation, determine that the specific surface has a surface type that defines a plane, cylinder, sphere, cone, torus, mesh, or b-spline; and
when the surface type defines the plane, cylinder, sphere, cone, torus, mesh, or b-spline, generate the uniform bi-cubic, b-spline approximation based on the surface type of the specific surface.