SchemeExt:Solid:unstitch-nm

From DocR23

Jump to: navigation, search

Contents

Action

Decomposes the input body along non-manifold edges and vertices.

Filename

scm/scmext/bool/bool_scm.cpp

APIs

api_unstitch_nonmani

Syntax

(solid:unstitch-nm body [us-opts] [acis-opts])

Argument Types

Argument Scheme Data Type
body body
us-opts unstitch_nm_options
acis-opts acis-options

Returns

(body...) 

The list of bodies contains at most four bodies: a solid body, a sheet body, a laminar body, and a wire body.

Description

This Scheme extension decomposes the input body along non-manifold edges and vertices, duplicating edges and vertices and making each decomposed region a separate lump in the output body. All lumps in the body become manifold unless they had self-non-manifold edges. The command also inserts all groups of wire edges into the body's wire list if they were not already there. Returned list of bodies contains the original body separated into manifold solid bodies, sheet bodies, laminar bodies, and wire bodies.

For additional information on unstitching non-manifold bodies, refer to Unstitching Nonmanifold Bodies or api_unstitch_nonmani.

Limitations

The bodies returned in the decomposition list may not be suitable for modeling operations, since duplicate edges and vertices may be present. Use body:separate to create disjoint bodies.

Arguments

  • body is the input body.
  • us-opts specifies the unstitch non-manifold option Scheme object.
  • acis-opts contains parameters for versioning and journaling.

Example

; solid:unstitch-nm
; Create a solid block.
    (define block1
        (solid:block (position -20 -20 -20) (position 20 20 20)))
;; block1
    (define block2
        (solid:block (position 0 0 -10) (position 20 20 10)))
;; block2
    (define union (bool:nonreg-unite block1 block2))
;; union
    (solid:manifold? union)
;; #f
    (define unstitch (solid:unstitch-nm union))
;; unstitch
    (define lumps (car unstitch))
;; lumps
    (define sheets (cadr unstitch))
;; sheets
; Transform the sheet body for visual purposes
    (entity:set-color sheets 3)
;; ()
    (entity:move sheets 40 0 0)
;; #[entity 4 1]
solid:unstitch-nm
solid:unstitch-nm
Personal tools