Hide Table of Contents
CreateBodyFromSurfaces Method (IBody2)

Creates a body from a list of trimmed surfaces.

.NET Syntax

Visual Basic (Declaration) 
Function CreateBodyFromSurfaces() As System.Boolean
Visual Basic (Usage) 
Dim instance As IBody2
Dim value As System.Boolean
 
value = instance.CreateBodyFromSurfaces()
C# 
System.bool CreateBodyFromSurfaces()
C++/CLI 
System.bool CreateBodyFromSurfaces(); 

Return Value

True if solid body is created

False if:

  • solid body is not created
    - or -
  • surface body is created

Example

Remarks

To create a body using trimmed surfaces:

  1. Create a new temporary body in a part using IPartDoc::CreateNewBody.
  2. Create the trimmed surfaces in the shape of the new body (for example, six square surfaces that intersect at the edges to form a cube).
    • Create a planar surface based on a root point and normal (two, three cell VARIANT arrays) using IBody2::CreatePlanarSurface(RootPoint, Normal).

    • Add a trimming loop to the planar surface using
      ISurface::AddTrimmingLoop2(Numcurves, _  
      Order, _
      Dimen, _
      Periodic, _
      NumKnots, _
      NumCtrlPoints, _
      Knots, _
      CtrlPointDbls, _
      UVRange)

    • Create a trimmed surface on the body based on the trimming loop that was just created. The arguments for Surface::AddTrimmingLoop2 and their values for a square are:
       

      Argument

      Description

      NumCurves

      Number of curves that make up the loop (4 Long)

      Order

      Orders for the spline curves ({2, 2, 2, 2} Array of Longs)

      Dimen

      Dimension of the control points for the spline curves ({2, 2, 2, 2} Array of Longs)

      Periodic

      Periodicity of the spline curves ({0, 0, 0, 0} Array of Longs)

      NumKnots

      Number of Knots of the spline curves ({4, 4, 4, 4} Array of Longs)

      NumCtrlPoints

      Number of Control points for the spline curves ({2, 2, 2, 2} Array of Longs)

      Knots

      Describes the locations of the knots ({0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1} Array of Doubles. Each knot represented by four numbers 0, 0, 1, 1)

      CtrlPointDbls

      Control points for the TrimmingLoop ({0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0} Array of Doubles. Describes the corners of the square)

      UVRange

      Min and max for the U and V values ({0, 1, 0, 1} Array of Doubles)

  3. Sew the surfaces together into a new body using this method.
 

See Also

Availability

SOLIDWORKS 2001Plus FCS, Revision Number 10.0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   CreateBodyFromSurfaces Method (IBody2)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:



x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2017 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.