Home

Offset Face and Wire
[Local Operations]

Collaboration diagram for Offset Face and Wire:

Classes

class  curvature_error_info
 Error information from an offset surface operation. More...
class  offset_error_info
 Error information from an offset operation. More...
class  offset_options
 Options for offset operations. More...
class  wire_offset_options
 Provides a data structure for wire offsetting operations to be used in the function api_offset_planar_wire. More...

Defines

#define UNSET_OPTION   -1
 Used to specify unset values in wire_offset_options.

Enumerations

enum  offset_on_faces
 Offset side values for api_offset_edges_on_faces. More...
enum  ofst_simplify_state
 Offset options values. More...
enum  sg_gap_type
 Defines the method to use to close an offset gap. More...

Functions

outcome api_initialize_offsetting ()
 Initializes the offsetting library.
outcome api_offset_edges_on_faces (ENTITY_LIST &coedge_chain, offset_on_faces which_faces, double offset_dist, BODY *&out_wire_body, offset_edges_options *offset_edges_opts, AcisOptions *ao)
 Creates a wire body whose edges are the offset of edges on faces for all edges of a coedge chain.
outcome api_offset_edges_on_faces (EDGE *inp_edge_of_circuit, double offset_dist, BODY *&out_wire_body, offset_edges_options *offset_edges_opts, AcisOptions *ao)
 Creates a wire body whose edges are the offset of edges on faces for all edges of a closed circuit.
outcome api_offset_edges_on_faces (LOOP *inp_loop, offset_on_faces which_faces, double offset_dist, BODY *&out_wire_body, offset_edges_options *offset_edges_opts, AcisOptions *ao)
 Creates a wire body whose edges are the offset of edges on faces for all edges of a loop.
outcome api_offset_edges_on_faces (FACE *inp_face, offset_on_faces which_faces, double offset_dist, BODY *&out_wire_body, offset_edges_options *offset_edges_opts, AcisOptions *ao)
 Creates a wire body whose edges are the offset of edges on faces for all edges of a face.
outcome api_offset_face (FACE *given_face, double offset_distance, FACE *&offset_face, offset_options *pOffOpts=NULL, AcisOptions *ao=NULL)
 Creates a face that is an offset of the given face.
outcome api_offset_face_edge (COEDGE const *given_coedge, double offset_distance, EDGE *&resulting_offset_edge, offset_face_edge_opts *opts=NULL, AcisOptions *ao=NULL)
 Creates an EDGE by offseting given_coedge from the face it borders.
outcome api_offset_face_loops (FACE *iFace, ENTITY_LIST &iEdges, double iOffsetDist, BODY *&oResultBody, AcisOptions *ao=NULL)
 Offsets a face's loops to form a new body.
outcome api_offset_face_loops (FACE *iFace, double offset_dist, BODY *&outbody, AcisOptions *ao=NULL)
 Offsets a face's loops to form a new body.
outcome api_offset_planar_wire (WIRE *given_wire, TRANSFORM const *trans, double offset_distance, const SPAunit_vector &wire_normal, BODY *&offset_wire, AcisOptions *ao=NULL)
 Creates a wire body that is an offset of the given wire.
outcome api_offset_planar_wire (BODY *iGivenWire, wire_offset_options *iOptons, BODY *&oOffsetWire, AcisOptions *ao=NULL)
 Creates a wire body that is an offset of the wires in the given body.
outcome api_offset_planar_wire (BODY *given_wire, law *offset_law, law *twist_law, const SPAunit_vector &wire_normal, BODY *&offset_wire, int gap_type=2, logical trim=TRUE, logical overlap=FALSE, AcisOptions *ao=NULL)
 Creates a wire body that is an offset of the wires in the given body.
outcome api_offset_planar_wire (BODY *given_wire, double offset_distance, const SPAunit_vector &wire_normal, BODY *&offset_wire, AcisOptions *ao=NULL)
 Creates a wire body that is an offset of the wires in the given body.
outcome api_terminate_offsetting ()
 Terminates the offsetting library.

Define Documentation

#define UNSET_OPTION   -1

Used to specify unset values in wire_offset_options.


Enumeration Type Documentation

Offset side values for api_offset_edges_on_faces.



Parameters:
SPA_OFST_ON_LEFT_FACE the edges are offset on the face(s) associated with the input.
SPA_OFST_ON_RIGHT_FACE the edges are offset on face(s) adjacent to that associated with the input

include <offset_opts.hxx>

Offset options values.



Parameters:
simplify_on simplifies the offset spline surface into analytical surface, if possible.
simplify_on does not simplify offset spline surface into analytical surface.
simplify_default when simplify_default value is specified, the option_header lop_simplify's value is used for defining the offset surface behavior.

include <offset_opts.hxx>

Defines the method to use to close an offset gap.


Parameters:
arc close with an arc.
corner close with a corner - extend linearly until intersection.
natural natural close - extend naturally until intersection.

include <off_wire.hxx>


Function Documentation

outcome api_initialize_offsetting (  ) 

Initializes the offsetting library.



Effect: System routine

Journal: Not Available

Product(s): 3D ACIS Modeler

include <ofstapi.hxx>

outcome api_offset_edges_on_faces ( ENTITY_LIST coedge_chain,
offset_on_faces  which_faces,
double  offset_dist,
BODY *&  out_wire_body,
offset_edges_options *  offset_edges_opts,
AcisOptions ao 
)

Creates a wire body whose edges are the offset of edges on faces for all edges of a coedge chain.



Role: This API creates a wire body by offseting edges where the offset edges lie on faces which are topologically connected to the input. The offset distance is measured along the surfaces of the intervening faces.

The input coedge chain must contain a list of coedges which are connected tip-to-tail, but proper ordering is not required.

The enumeration offset_on_faces determines the side on which to calculate the offset. The value SPA_OFST_ON_LEFT_FACE uses the face to the left of the edge's coedge, which typically is the face associated with the input. The value SPA_OFST_ON_RIGHT_FACE uses the face to the right of the edge's coedge, which typically is the face adjacent to that associated with the input.

Errors: Coedge list does not form a properly connected chain.

Limitations:

  • Offsets beyond a sheet boundary are not handled.
  • Negative offset distances are currently not allowed.
  • No automatic trimming of loops in the resulting wire body.
  • Offsets with large shape differences as compared to the input may not have the desired accuracy.


Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
coedge_chain coedge chain whose edges are to be offset.
which_faces enumeration specifying the side.
offset_dist distance to offset the edges on the faces.
out_wire_body offset wire body.
offset_edges_opts not currently used.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_edges_on_faces ( EDGE inp_edge_of_circuit,
double  offset_dist,
BODY *&  out_wire_body,
offset_edges_options *  offset_edges_opts,
AcisOptions ao 
)

Creates a wire body whose edges are the offset of edges on faces for all edges of a closed circuit.



Role: This API creates a wire body by offseting edges where the offset edges lie on faces which are topologically connected to the input. The offset distance is measured along the surfaces of the intervening faces.

The input edge representing the closed circuit must lie on the sheet boundary.

Errors:

  • NULL input.
  • Input edge is not on the sheet boundary.


Limitations:
  • Offsets beyond a sheet boundary are not handled.
  • Negative offset distances are currently not allowed.
  • No automatic trimming of loops in the resulting wire body.
  • Offsets with large shape differences as compared to the input may not have the desired accuracy.


Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
inp_edge_of_circuit edge representing a closed circuit whose edges are to be offset.
offset_dist distance to offset the edges on the faces.
out_wire_body offset wire body.
offset_edges_opts not currently used.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_edges_on_faces ( LOOP inp_loop,
offset_on_faces  which_faces,
double  offset_dist,
BODY *&  out_wire_body,
offset_edges_options *  offset_edges_opts,
AcisOptions ao 
)

Creates a wire body whose edges are the offset of edges on faces for all edges of a loop.



Role: This API creates a wire body by offseting edges where the offset edges lie on faces which are topologically connected to the input. The offset distance is measured along the surfaces of the intervening faces.

The enumeration offset_on_faces determines the side on which to calculate the offset. The value SPA_OFST_ON_LEFT_FACE uses the face to the left of the edge's coedge, which typically is the face associated with the input. The value SPA_OFST_ON_RIGHT_FACE uses the face to the right of the edge's coedge, which typically is the face adjacent to that associated with the input.

Errors: NULL input.

Limitations:

  • Offsets beyond a sheet boundary are not handled.
  • Negative offset distances are currently not allowed.
  • No automatic trimming of loops in the resulting wire body.
  • Offsets with large shape differences as compared to the input may not have the desired accuracy.


Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
inp_loop loop whose edges are to be offset.
which_faces enumeration specifying the side.
offset_dist distance to offset the edges on the faces.
out_wire_body offset wire body.
offset_edges_opts not currently used.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_edges_on_faces ( FACE inp_face,
offset_on_faces  which_faces,
double  offset_dist,
BODY *&  out_wire_body,
offset_edges_options *  offset_edges_opts,
AcisOptions ao 
)

Creates a wire body whose edges are the offset of edges on faces for all edges of a face.



Role: This API creates a wire body by offseting edges where the offset edges lie on faces which are topologically connected to the input. The offset distance is measured along the surfaces of the intervening faces.

The enumeration offset_on_faces determines the side on which to calculate the offset. The value SPA_OFST_ON_LEFT_FACE uses the face to the left of the edge's coedge, which typically is the face associated with the input. The value SPA_OFST_ON_RIGHT_FACE uses the face to the right of the edge's coedge, which typically is the face adjacent to that associated with the input.

Errors: NULL input.

Limitations:

  • Offsets beyond a sheet boundary are not handled.
  • Negative offset distances are currently not allowed.
  • No automatic trimming of loops in the resulting wire body.
  • Offsets with large shape differences as compared to the input may not have the desired accuracy.


Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
inp_face face whose edges are to be offset.
which_faces enumeration specifying the side.
offset_dist distance to offset the edges on the faces.
out_wire_body offset wire body.
offset_edges_opts not currently used.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_face ( FACE given_face,
double  offset_distance,
FACE *&  offset_face,
offset_options pOffOpts = NULL,
AcisOptions ao = NULL 
)

Creates a face that is an offset of the given face.



Role: This API creates a face whose surface is offset from the given face. The edges of the offset face are offset from the given face.

It is assumed that the user will not do offsets that result in degenerate offsets. Offset distances larger than the smallest radius of curvature (principal) will probably cause degenerate cases.

Because a face cannot have a transform, the programmer must apply the transform from the body to the face after the offset, if needed, or fix the transform on the body before offsetting the face.

Errors: Pointer to face is NULL or not to a FACE.

Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
given_face given face.
offset_distance distance to offset new face.
offset_face returns resulting face.
pOffOpts offset options
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_face_edge ( COEDGE const *  given_coedge,
double  offset_distance,
EDGE *&  resulting_offset_edge,
offset_face_edge_opts *  opts = NULL,
AcisOptions ao = NULL 
)

Creates an EDGE by offseting given_coedge from the face it borders.



Role: This API creates an edge which is offset from given_coedge, in the direction normal to the face to which given_coedge is attached.

The parameter interval and sense of the output edge match that of given_coedge->edge().

Any transformations which acted on the owner of given_coedge are used to transform resulting_offset_edge.

Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
given_coedge the given coedge.
offset_distance the distance to offset the new edge.
resulting_offset_edge the pointer to the result of the offset operation.
offset_face_edge_opts This parameter is reserved for future use; defaults to NULL.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_face_loops ( FACE iFace,
ENTITY_LIST iEdges,
double  iOffsetDist,
BODY *&  oResultBody,
AcisOptions ao = NULL 
)

Offsets a face's loops to form a new body.

The face geometry need not be planar.

Role: This API creates a new face, in the outbody. This face contains the loops which are the offset from the input face. The face geometry need not be planar.

Limitations: Refer to the face:offset-loops technical article for known limitations.

Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
in_face face which has the loop(s) to be offset.
iEdges list of edges to specify the loops, which contain at least one edge in the list.
offset_dist distance to offset.
outbody offset body.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_face_loops ( FACE iFace,
double  offset_dist,
BODY *&  outbody,
AcisOptions ao = NULL 
)

Offsets a face's loops to form a new body.

The face geometry need not be planar.

Role: This API creates a new face, in the outbody. This face contains the loops which are the offset from the input face. The face geometry need not be planar.

Limitations: Refer to the face:offset-loops technical article for known limitations.

Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
in_face face which has the loop(s) to be offset.
offset_dist distance to offset.
outbody offset body.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_planar_wire ( WIRE given_wire,
TRANSFORM const *  trans,
double  offset_distance,
const SPAunit_vector wire_normal,
BODY *&  offset_wire,
AcisOptions ao = NULL 
)

Creates a wire body that is an offset of the given wire.



Role: The wire is offset so that no portion of the offset wire is closer to the original wire than the offset distance. Trimming the offset overlap caused by C0 edges, filling in the gaps caused by the offsets of C0 edges, and trimming areas of interference between offset segments are operations that get carried out.

This API function has four overloaded signatures: the one using wire_offset_options is the newest and includes nearly all the functionality of the other three. Therefore, the others are becoming obsolete.

A positive offset distance is in the direction of the cross product (wire_tangent x wire_plane_normal). A negative offset is in the opposite direction.

Errors:

  • Pointer to wire is NULL.
  • Zero length normal vector specified.


Limitations:
  • Performing a wire body offset with open wires can encounter behavior that is potentially different from what is expected. Offsetting of closed wires does not have the potential for this issue. When offsetting an open wire body, all of the edges are offset first.


Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
given_wire planar wire to be offset.
trans transformation.
offset_distance given distance.
wire_normal resulting normal vector.
offset_wire returns offset wire body.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_planar_wire ( BODY iGivenWire,
wire_offset_options iOptons,
BODY *&  oOffsetWire,
AcisOptions ao = NULL 
)

Creates a wire body that is an offset of the wires in the given body.



Role: Each wire in the given body is offset so that no portion of the offset wire is closer to the original wire than the offset distance. Trimming the offset overlap caused by C0 edges, filling in the gaps caused by the offsets of C0 edges, and trimming areas of interference between offset segments are operations that get carried out.

This API function has four overloaded signatures. This one, using wire_offset_options, is the newest and includes nearly all the functionality of the other three. Therefore, the others are becoming obsolete. Refer to the documentation for the wire_offset_options for detailed information on the meaning of all the available options, or to the technical article for the wire-offset:options Scheme extension. An example of how to use this API can be found in the source code for the wire-body:offset Scheme extension. It also shows how to create the required laws and the meaning of the gap types.

The function expects a body containing at least one independent wire (not connected to any faces). If the body contains multiple independent wires, each independent wire in the body will be offset and united with the offsets of the others. To offset a single wire of a multi-wire body, call the version of api_offset_planar_wire that takes a WIRE instead of a BODY.

Known Case: Performing a wire body offset with open wires can encounter behavior that is potentially different from what is expected. Offsetting of closed wires does not have the potential for this issue. When offsetting an open wire body, all of the edges are offset first.

Errors:

  • Pointer to wire body is NULL or not to a wire body.
  • Zero length normal vector specified.


Limitations: Performing a wire body offset with open wires can encounter behavior that is potentially different from what is expected (refer to the Known Case section above).

Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
iGivenWire planar wire body to be offset.
iOptons offset options.
oOffsetWire returns offset wire body.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_planar_wire ( BODY given_wire,
law offset_law,
law twist_law,
const SPAunit_vector wire_normal,
BODY *&  offset_wire,
int  gap_type = 2,
logical  trim = TRUE,
logical  overlap = FALSE,
AcisOptions ao = NULL 
)

Creates a wire body that is an offset of the wires in the given body.



Role: Each wire in the given body is offset so that no portion of the offset wire is closer to the original wire than the offset distance. Trimming the offset overlap caused by C0 edges, filling in the gaps caused by the offsets of C0 edges, and trimming areas of interference between offset segments are operations that get carried out.

This API function has four overloaded signatures: the one using wire_offset_options is the newest and includes nearly all the functionality of the other three. Therefore, the others are becoming obsolete.

An example of how to use this API can be found in the technical article and the source code for the wire-body:offset Scheme extension. It also shows how to create the required laws and the meaning of the gap types.

The law version of api_offset_planar_wire can always be used and can obtain the same results as the non-law versions by passing it simple laws. A law can be created using api_str_to_law, which converts a law function string into the appropriate law classes and returns a pointer to the top-level class which can be passed into this API.

In the law version of api_offset_planar_wire, the wire is offset by the given law and trimmed for self-intersections. If a non-zero twist law is given, then the resulting wire will twist around the given wire and trimming will not be done.

The offset direction is given by the cross product of the wires tangent and the planar normal. If a twist law is given, then the twist starts in the offset direction and rotates around the wire by the given radians of the twist law using the right-hand rule. A negative offset twists in the opposite direction.

The function expects a body containing at least one independent wire (not connected to any faces). If the body contains multiple independent wires, each independent wire in the body will be offset and united with the offsets of the others. To offset a single wire of a multi-wire body, call the version of api_offset_planar_wire that takes a WIRE instead of a BODY.

The gap_type is as follows:
0 = rounded arcs
1 = linear extension
2 = natural curve extensions

If the trim argument is TRUE, the function trims the self-intersections. If it is FALSE, the function does not trim the intersections. Use FALSE only if you know that the result will not self-intersect.

Errors:

  • Pointer to wire body is NULL or not to a wire body.
  • Zero length normal vector specified.


Limitations:
  • Performing a wire body offset with open wires can encounter behavior that is potentially different from what is expected. Offsetting of closed wires does not have the potential for this issue. When offsetting an open wire body, all of the edges are offset first.


Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
given_wire planar wire body to be offset.
offset_law distance to offset.
twist_law twist in radians.
wire_normal resulting normal vector.
offset_wire returns offset wire body.
gap_type gap type.
trim trim flag.
overlap overlap flag.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_offset_planar_wire ( BODY given_wire,
double  offset_distance,
const SPAunit_vector wire_normal,
BODY *&  offset_wire,
AcisOptions ao = NULL 
)

Creates a wire body that is an offset of the wires in the given body.



Role: Each wire in the given body is offset so that no portion of the offset wire is closer to the original wire than the offset distance. Trimming the offset overlap caused by C0 edges, filling in the gaps caused by the offsets of C0 edges, and trimming areas of interference between offset segments are operations that get carried out.

This API function has four overloaded signatures: the one using wire_offset_options is the newest and includes nearly all the functionality of the other three. Therefore, the others are becoming obsolete.

A positive offset distance is in the direction of the cross product (wire_tangent x wire_plane_normal). A negative offset is in the opposite direction.

The function expects a body containing at least one independent wire (not connected to any faces). If the body contains multiple independent wires, each independent wire in the body will be offset and united with the offsets of the others. To offset a single wire of a multi-wire body, call the version of api_offset_planar_wire that takes a WIRE instead of a BODY.

Errors:

  • Pointer to wire body is NULL or not to a wire body.
  • Zero length normal vector specified.


Limitations: Performing a wire body offset with open wires can encounter behavior that is potentially different from what is expected. Offsetting of closed wires does not have the potential for this issue. When offsetting an open wire body, all of the edges are offset first.

Effect: Changes model

Journal: Available

Product(s): 3D ACIS Modeler

Parameters:
given_wire planar wire body to be offset.
offset_distance distance to offset.
wire_normal resulting normal vector.
offset_wire returns offset wire body.
ao ACIS options such as versioning and journaling.

include <ofstapi.hxx>

outcome api_terminate_offsetting (  ) 

Terminates the offsetting library.



Effect: System routine

Journal: Not Available

Product(s): 3D ACIS Modeler

include <ofstapi.hxx>