SchemeExt:Sheet:cover-circuit

From DocR21

Jump to: navigation, search

Contents

Action

Covers a closed circuit of connected edges with a face.

Filename

scm/scmext/covr/covr_scm.cpp

APIs

api_cover_circuits

Syntax

(sheet:cover-circuit edge-list1 [edge-list2 edge-list3 ...] [surf|co] [ao])

Argument Types

Argument Scheme Data Type
edge-list1 (edge ...)
surf face
co cover_options
ao acis_options

Returns

body

Description

This extension covers the provided closed circuits of connected edges with a face. It attempts to determine a surface that contains the edges of each circuit. If a surface can be calculated, it is used for the geometry of the face. If a surface cannot be calculated, a face with no geometric definition is created and a warning message is displayed. Each circuit of edges must be closed and not self-intersecting. When a face is defined with the optional surf argument, the underlying surface of that face is used for the geometry in covering the wire body.

Note that when you specify the covering surface (either via the surf argument or cover_options::set_covering_surface), the given wire body is covered using the geometry you specify. That is, a face is made where the boundary is a loop from the given wire body and the surface geometry is the covering surface. This method of using the Scheme command requires you to find a covering surface, but allows much more flexibility in how you cover a wire.

The co argument can be used to specify a cover surface, and also an allowable gap tolerance. If the gap tolerance is specified, the specified covering surface or the best fit plane are allowed to miss the circuit being covered by any amount less than the gap tolerance. When specifying gap tolerance, you may also specify a tolerize_entity_opts object to control precisely how the body is tolerized after covering. The default behavior if no tolerance is specified is to disallow gaps, and therefore have no need to tolerize.

Arguments

  • edge-list1 is an ordered list of edges.
  • surf is an input face; if defined, the surface underlying this face is used to cover the face boundaries.
  • co is a cover_options object.
  • ao is an optional argument that contains versioning and journaling information.

Limitations

  • The order of the edges in each list must be such that the edges form a closed circuit.
  • All edges must belong to the same body.
  • Each circuit must be closed, unbranched, and non-self-intersecting.

Example

(part:clear)
(define b (solid:block 0 0 0 10 10 10))
(define s (solid:sphere 10 10 10 5))
(iso)
(zoom-all)
(define b (solid:subtract b s))
(ray:queue 210.381 91.3469 111.311 -0.834673 -0.344149 -0.42998 1)
(define f (pick-face))
(define elist (entity:edges f))
; remove the face
(entity:delete (face:unhook f))
; cover the hole
(sheet:cover-circuit elist)
(render:rebuild)
sheet:cover-circuit

See Also

Personal tools
Live