0% found this document useful (0 votes)
5 views196 pages

Design Module Users Guide

The Design Module User's Guide provides detailed information about the features and tools available in the COMSOL Design Module, including geometry tools, programming commands, and support resources. It outlines the software's licensing, patent information, and contact details for support and inquiries. The guide is structured into chapters covering various aspects of geometry manipulation, defeaturing tools, and command references for both 2D and 3D geometry creation.

Uploaded by

walzikisalah100
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views196 pages

Design Module Users Guide

The Design Module User's Guide provides detailed information about the features and tools available in the COMSOL Design Module, including geometry tools, programming commands, and support resources. It outlines the software's licensing, patent information, and contact details for support and inquiries. The guide is structured into chapters covering various aspects of geometry manipulation, defeaturing tools, and command references for both 2D and 3D geometry creation.

Uploaded by

walzikisalah100
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Design Module

User’s Guide
Design Module User’s Guide
© 2005–2023 COMSOL
Protected by patents listed on [Link]/patents, or see Help>About COMSOL Multiphysics on the
File menu in the COMSOL Desktop for less detailed lists of U.S. Patents that may apply. Patents pending.
This Documentation and the Programs described herein are furnished under the COMSOL Software License
Agreement ([Link]/comsol-license-agreement) and may be used or copied only under the terms
of the license agreement. Portions of this software are owned by Siemens Product Lifecycle Management
Software Inc. © 1986–2022. All Rights Reserved. Portions of this software are owned by Spatial Corp. ©
1989–2022. All Rights Reserved.
COMSOL, the COMSOL logo, COMSOL Multiphysics, COMSOL Desktop, COMSOL Compiler,
COMSOL Server, and LiveLink are either registered trademarks or trademarks of COMSOL AB. ACIS and
SAT are registered trademarks of Spatial Corporation. CATIA is a registered trademark of Dassault Systèmes
or its subsidiaries in the US and/or other countries. Parasolid is a trademark or registered trademark of
Siemens Product Lifecycle Management Software Inc. or its subsidiaries in the United States and in other
countries. All other trademarks are the property of their respective owners, and COMSOL AB and its
subsidiaries and products are not affiliated with, endorsed by, sponsored by, or supported by those or the
above non-COMSOL trademark owners. For a list of such trademark owners, see [Link]/
trademarks.
Version: COMSOL 6.2

Contact Information
Visit the Contact COMSOL page at [Link]/contact to submit general inquiries
or search for an address and phone number. You can also visit the Worldwide Sales Offices
page at [Link]/contact/offices for address and contact information.

If you need to contact Support, an online request form is located on the COMSOL Access
page at [Link]/support/case. Other useful links include:

• Support Center: [Link]/support


• Product Download: [Link]/product-download
• Product Updates: [Link]/product-update
• COMSOL Blog: [Link]/blogs
• Discussion Forum: [Link]/forum
• Events: [Link]/events
• COMSOL Video Gallery: [Link]/videos
• Support Knowledge Base: [Link]/support/knowledgebase

Part No. CM024001


C o n t e n t s

Chapter 1: Introduction

About the Design Module 12


Overview of the Included Geometry Tools and Features. . . . . . . . 12
Overview of the User’s Guide . . . . . . . . . . . . . . . . . . 15
Where Do I Access the Documentation and Application Libraries? . . . . 15

Chapter 2: Geometry Tools and Features

Constraint and Dimension Features 20


Working with Constraints and Dimensions . . . . . . . . . . . . . 20
Angle . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Coincident . . . . . . . . . . . . . . . . . . . . . . . . . 30
Concentric . . . . . . . . . . . . . . . . . . . . . . . . . 30
Directed Distance . . . . . . . . . . . . . . . . . . . . . . 31
Distance . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Equal Distance . . . . . . . . . . . . . . . . . . . . . . . . 33
Equal Radius . . . . . . . . . . . . . . . . . . . . . . . . 34
Horizontal . . . . . . . . . . . . . . . . . . . . . . . . . 35
Parallel. . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Perpendicular . . . . . . . . . . . . . . . . . . . . . . . . 35
Position . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Radius . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Tangent Constraint . . . . . . . . . . . . . . . . . . . . . . 37
Total Edge Length . . . . . . . . . . . . . . . . . . . . . . 38
Vertical . . . . . . . . . . . . . . . . . . . . . . . . . . 38
x-Distance . . . . . . . . . . . . . . . . . . . . . . . . . 39
y-Distance . . . . . . . . . . . . . . . . . . . . . . . . . 40

Geometry Representation 42
Working with the CAD Kernel . . . . . . . . . . . . . . . . . 42
Converting Objects to COMSOL Kernel Representation . . . . . . . 44

CONTENTS |5
Converting Objects to CAD Kernel Representation . . . . . . . . . 45

Importing and Exporting CAD Files 46


Importing 3D CAD Files . . . . . . . . . . . . . . . . . . . . 46
Exporting Objects to 3D CAD Formats . . . . . . . . . . . . . . 52

Repairing and Defeaturing 54


Check . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Delete Fillets . . . . . . . . . . . . . . . . . . . . . . . . 56
Delete Holes . . . . . . . . . . . . . . . . . . . . . . . . 58
Delete Short Edges . . . . . . . . . . . . . . . . . . . . . . 60
Delete Sliver Faces . . . . . . . . . . . . . . . . . . . . . . 62
Delete Small Faces . . . . . . . . . . . . . . . . . . . . . . 63
Delete Spikes . . . . . . . . . . . . . . . . . . . . . . . . 65
Detach Faces . . . . . . . . . . . . . . . . . . . . . . . . 67
Detect Interferences . . . . . . . . . . . . . . . . . . . . . 68
Repair . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Replace Faces . . . . . . . . . . . . . . . . . . . . . . . . 73

Creating and Modifying Geometries 75


Cap Faces . . . . . . . . . . . . . . . . . . . . . . . . . 75
Chamfer . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Fillet . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Knit to Solid . . . . . . . . . . . . . . . . . . . . . . . . 81
Loft . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Midsurface . . . . . . . . . . . . . . . . . . . . . . . . . 87
Offset Faces. . . . . . . . . . . . . . . . . . . . . . . . . 89
Projection . . . . . . . . . . . . . . . . . . . . . . . . . 93
Thicken . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Transform Faces . . . . . . . . . . . . . . . . . . . . . . . 97

Chapter 3: Programming and Command Reference

Defeaturing Tools 102


Defeaturing Tools — Finding and Deleting Small Details . . . . . . . 102
Defeaturing Tools — Detach Faces . . . . . . . . . . . . . . . 105

6 | CONTENTS
Defeaturing Tools — Detect Interferences . . . . . . . . . . . . 106
Defeaturing Tools — Replace Faces. . . . . . . . . . . . . . . 106

Summary of Commands 108

Commands Grouped by Function 110


Commands for Creating and Modifying Geometry in 2D . . . . . . 110
Commands for Creating Constraints in 2D . . . . . . . . . . . . 111
Commands for Creating Dimensions in 2D . . . . . . . . . . . 111
Commands for Defeaturing . . . . . . . . . . . . . . . . . 112
Commands for File Import, Export, Conversion, and Repair . . . . . 112
Commands for Creating and Modifying Geometry in 3D . . . . . . 112

Commands in Alphabetical Order 114


Angle . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Array . . . . . . . . . . . . . . . . . . . . . . . . . . 115
BezierPolygon . . . . . . . . . . . . . . . . . . . . . . . 115
CapFaces . . . . . . . . . . . . . . . . . . . . . . . . . 115
Chamfer . . . . . . . . . . . . . . . . . . . . . . . . . 116
Chamfer3D . . . . . . . . . . . . . . . . . . . . . . . . 117
Check . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Circle . . . . . . . . . . . . . . . . . . . . . . . . . . 119
CircularArc . . . . . . . . . . . . . . . . . . . . . . . . 120
Coincident . . . . . . . . . . . . . . . . . . . . . . . . 121
Concentric . . . . . . . . . . . . . . . . . . . . . . . . 121
ConvertToCOMSOL . . . . . . . . . . . . . . . . . . . . 122
Copy . . . . . . . . . . . . . . . . . . . . . . . . . . 124
CubicBezier . . . . . . . . . . . . . . . . . . . . . . . . 124
DeleteFillets . . . . . . . . . . . . . . . . . . . . . . . 124
DeleteHoles . . . . . . . . . . . . . . . . . . . . . . . 127
DeleteShortEdges . . . . . . . . . . . . . . . . . . . . . 130
DeleteSliverFaces. . . . . . . . . . . . . . . . . . . . . . 133
DeleteSmallFaces . . . . . . . . . . . . . . . . . . . . . . 136
DeleteSpikes . . . . . . . . . . . . . . . . . . . . . . . 138
DetachFaces . . . . . . . . . . . . . . . . . . . . . . . 141
DetectInterferences. . . . . . . . . . . . . . . . . . . . . 144
DirectedDistance. . . . . . . . . . . . . . . . . . . . . . 144
Distance . . . . . . . . . . . . . . . . . . . . . . . . . 146

CONTENTS |7
Ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . 147
EqualDistance . . . . . . . . . . . . . . . . . . . . . . . 147
EqualRadius . . . . . . . . . . . . . . . . . . . . . . . . 148
Export, ExportFinal . . . . . . . . . . . . . . . . . . . . . 149
Horizontal . . . . . . . . . . . . . . . . . . . . . . . . 151
Fillet . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Fillet3D . . . . . . . . . . . . . . . . . . . . . . . . . 152
Import 3D CAD . . . . . . . . . . . . . . . . . . . . . . 154
InterpolationCurve . . . . . . . . . . . . . . . . . . . . . 162
Knit . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
LineSegment . . . . . . . . . . . . . . . . . . . . . . . 164
Loft . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Midsurface . . . . . . . . . . . . . . . . . . . . . . . . 168
Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Move . . . . . . . . . . . . . . . . . . . . . . . . . . 170
OffsetFaces . . . . . . . . . . . . . . . . . . . . . . . . 170
Parallel. . . . . . . . . . . . . . . . . . . . . . . . . . 172
Perpendicular . . . . . . . . . . . . . . . . . . . . . . . 173
Point . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Polygon . . . . . . . . . . . . . . . . . . . . . . . . . 174
Position . . . . . . . . . . . . . . . . . . . . . . . . . 174
Projection . . . . . . . . . . . . . . . . . . . . . . . . 175
QuadraticBezier . . . . . . . . . . . . . . . . . . . . . . 177
Radius . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Rectangle . . . . . . . . . . . . . . . . . . . . . . . . . 178
Repair . . . . . . . . . . . . . . . . . . . . . . . . . . 179
ReplaceFaces . . . . . . . . . . . . . . . . . . . . . . . 181
Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Scale . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Square . . . . . . . . . . . . . . . . . . . . . . . . . . 184
TangentConstraint . . . . . . . . . . . . . . . . . . . . . 185
Thicken . . . . . . . . . . . . . . . . . . . . . . . . . 186
TotalEdgeLength . . . . . . . . . . . . . . . . . . . . . . 189
TransformFaces . . . . . . . . . . . . . . . . . . . . . . 189
Vertical . . . . . . . . . . . . . . . . . . . . . . . . . 192
XDistance . . . . . . . . . . . . . . . . . . . . . . . . 193

8 | CONTENTS
YDistance . . . . . . . . . . . . . . . . . . . . . . . . 194

Index 197

CONTENTS |9
10 | C O N T E N T S
1

Introduction

Welcome to the Design Module User’s Guide. This guide details the functionality
of this optional package that extends the COMSOL Multiphysics® modeling
environment with additional tools and features to create and modify geometry, and
to import and export geometry using the most common 3D CAD file formats.

This introductory chapter contains an overview of the capabilities of the module,


including a summary of the included geometry features, an overview of this guide,
and a description of where to find documentation and model examples.

11
About the Design Module
Overview of the Included Geometry Tools and Features
The Design Module extends the geometry modeling capabilities of COMSOL
Multiphysics with constraint and dimension features in 2D, a dedicated geometric
kernel, the CAD kernel, features for creating and modifying geometry, import, and
export of several 3D CAD formats, and functionality to repair and defeature imported
geometry objects. Included geometry features are, for example, the fillet and chamfer
features in 3D, and the loft feature that can generate 3D surfaces based on cross
sectional profiles, which could come from an MRI scan, or could be the faces of
existing geometry objects. Further functionality such as the midsurface and thicken
allows for converting a thin solid object into a surface, or the other way around.

The import capabilities cover the most common 3D CAD file formats: ACIS®,
AutoCAD ®, IGES, Inventor ®, NX®, Parasolid®, PTC Creo Parametric™, PTC
Pro/ENGINEER ®, SOLIDWORKS®, and STEP. In addition, support for CATIA®
V5 is available as a separate add-on. To exchange data with CAD packages, you can
export your geometry to the ACIS®, IGES, Parasolid®, and STEP file formats.

Finally, the product provides a wide range of tools for you to prepare an imported 3D
design for meshing and analysis. You can interactively search for and remove geometric
features, for example, fillets, holes, slivers, small faces, and short edges. You can also
modify objects by detaching a portion to form an additional computational domain,
or by creating a fluid domain for computation, in case the CAD design only includes
the solid parts.

GEOMETRY FEATURE ICON DESCRIPTION

2D Geometry Features

Angle Constrain the angle between two edges

Coincident Constrain two geometric entities to coincide with


each other

Concentric Constrain circular edges and vertices to have the


same center

12 | CHAPTER 1: INTRODUCTION
GEOMETRY FEATURE ICON DESCRIPTION

Directed Distance Constrain the distance between two geometric


entities in a given direction

Distance Constrain the distance between two geometric


entities

Equal Distance Constrain the distances between two pairs of


geometric entities to be equal

Equal Radius Constrain two circular edges to have the same


radius

Horizontal Constrain a straight edge to be parallel to the


x-axis

Parallel Constrain straight edges to be parallel

Perpendicular Constrain two straight edges to be perpendicular

Position Constrain the x- and y-coordinates of a point

Projection Project 3D objects and entities to a work plane

Radius Constrain the radius of a circular edge

Tangent Constraint Constrain two edges to be tangent

Total Edge Length Constrain the total length for a set of edges

Vertical Constrain a straight edge to be parallel to the


y-axis

x-Distance Constrain the distance in the x direction between


entities

y-Distance Constrain the distance in the y direction between


entities

3D Geometry Features

Cap Faces Generate faces from edges to fill gaps and create
solid objects, or to partition solids

Check Check CAD objects for faults, for example


tolerance issues and invalid entities

Chamfer Create a bevel on selected edges

ABOUT THE DESIGN MODULE | 13


GEOMETRY FEATURE ICON DESCRIPTION

Convert to COMSOL Convert to the COMSOL kernel representation

Replace Faces Delete and replace faces

Delete Fillets Search for and delete fillets

Delete Holes Search for and delete holes

Delete Short Edges Search for and delete short edges

Delete Sliver Faces Search for and delete sliver faces

Delete Small Faces Search for and collapse small faces

Delete Spikes Search for and delete spikes from faces

Detach Faces Detach faces to form a new object from them

Detect Interferences Search for interferences, such as intersections,


gaps, touches, and containments, between objects

Export Export geometry objects to 3D CAD file formats

Fillet Create rounds on selected edges

Import Import geometry objects from 3D CAD file


formats

Knit to Solid Knit surface objects to form solid or surface


object

Loft Create a lofted surface from a set of profile curves

Midsurface Generate midsurfaces for selected solid objects

Offset Faces Offset faces of 3D objects in the normal direction

Repair Repair defects and remove small details from 3D


objects

Replace Faces Replace faces by growing surrounding faces or


creating new faces

Thicken Create a solid by offsetting selected surfaces

Transform Faces Displace, rotate, and scale faces of 3D objects

14 | CHAPTER 1: INTRODUCTION
Overview of the User’s Guide
This documentation covers the Design Module and the add-on for file import of
CATIA® V5 files. Instructions on how to use the geometry modeling tools in
COMSOL Multiphysics® in general are included with the COMSOL Multiphysics
Reference Manual. To help you get started with modeling this module is also
accompanied by the quick-start guide Introduction to Design Module.

Where Do I Access the Documentation and Application Libraries?


A number of internet resources have more information about COMSOL, including
licensing and technical information. The electronic documentation, topic-based (or
context-based) help, and the application libraries are all accessed through the
COMSOL Desktop.

If you are reading the documentation as a PDF file on your computer, the
blue links do not work to open an application or content referenced in a
different guide. However, if you are using the Help system in COMSOL
Multiphysics, these links work to other modules (as long as you have a
license), application examples, and documentation sets.

THE DOCUMENTATION AND ONLINE HELP


The COMSOL Multiphysics Reference Manual describes all core physics interfaces
and functionality included with the COMSOL Multiphysics license. This book also has
instructions about how to use COMSOL Multiphysics and how to access the
electronic Documentation and Help content.

Opening Topic-Based Help


The Help window is useful as it is connected to many of the features on the GUI. To
learn more about a node in the Model Builder, or a window on the Desktop, click to
highlight a node or window, then press F1 to open the Help window, which then

ABOUT THE DESIGN MODULE | 15


displays information about that feature (or click a node in the Model Builder followed
by the Help button ( ). This is called topic-based (or context) help.

To open the Help window:

• In the Model Builder, Application Builder, or Physics Builder click a node or


window and then press F1.
• On any toolbar (for example, Home, Definitions, or Geometry), hover the
mouse over a button (for example, Add Physics or Build All) and then
press F1.
• From the File menu, click Help ( ).
• In the upper-right corner of the COMSOL Desktop, click the Help ( )
button.

To open the Help window:

• In the Model Builder or Physics Builder click a node or window and then
press F1.
• In the main toolbar, click the Help ( ) button.
• From the main menu, select Help>Help.

Opening the Documentation Window

To open the Documentation window:

• Press Ctrl+F1.
• From the File menu select Help>Documentation ( ).

To open the Documentation window:

• Press Ctrl+F1.
• In the main toolbar, click the Documentation ( ) button.
• From the main menu, select Help>Documentation.

16 | CHAPTER 1: INTRODUCTION
THE APPLICATION LIBRARIES WINDOW
Each application includes documentation with the theoretical background and
step-by-step instructions to create a model application. The applications are available
in COMSOL as MPH-files that you can open for further investigation. You can use the
step-by-step instructions and the actual applications as a template for your own
modeling and applications. In most models, SI units are used to describe the relevant
properties, parameters, and dimensions in most examples, but other unit systems are
available.

Once the Application Libraries window is opened, you can search by name or browse
under a module folder name. Click to view a summary of the application and its
properties, including options to open it or a PDF document.

The Application Libraries Window in the COMSOL Multiphysics


Reference Manual.

Opening the Application Libraries Window


To open the Application Libraries window ( ):

• In the Home toolbar, click Windows and select Application Libraries.


When the toolbar is compressed, you sometimes find it under
Layout>Windows.
• From the File menu select Application Libraries.

To include the latest versions of model examples, from the File>Help menu
select ( ) Update COMSOL Application Libraries.

From the File or Windows menu select Application Libraries.

To include the latest versions of model examples, from the Help menu
select ( ) Update COMSOL Application Libraries.

CONTACTING COMSOL BY EMAIL


For general product information, contact COMSOL at info@[Link].

To receive technical support from COMSOL for the COMSOL products, please
contact your local COMSOL representative or send your questions to

ABOUT THE DESIGN MODULE | 17


support@[Link]. An automatic notification and case number is sent to you by
email.

COMSOL WEBSITES

COMSOL website [Link]


Contact COMSOL [Link]/contact
COMSOL Access [Link]/access
Support Center [Link]/support
Product Download [Link]/product-download
Product Updates [Link]/product-update
COMSOL Blog [Link]/blogs
Discussion Forum [Link]/forum
Events [Link]/events
COMSOL Video Gallery [Link]/videos
Support Knowledge Base [Link]/support/knowledgebase

18 | CHAPTER 1: INTRODUCTION
2

Geometry Tools and Features

This chapter describes the tools and features available for creating, importing, and
modifying geometry with the Design Module.

In this chapter:

• Constraint and Dimension Features


• Geometry Representation
• Importing and Exporting CAD Files
• Repairing and Defeaturing
• Creating and Modifying Geometries

19
Constraint and Dimension Features
In this section:

• Working with Constraints and Dimensions


• Angle
• Coincident
• Concentric
• Directed Distance
• Distance
• Equal Distance
• Equal Radius
• Horizontal
• Parallel
• Perpendicular
• Position
• Radius
• Tangent Constraint
• Total Edge Length
• Vertical
• x-Distance
• y-Distance

Working with Constraints and Dimensions


With the Design Module you can apply constraints and dimensions to geometry in 2D
geometry sequences, including in geometric parts and on work planes in 3D. By using
drawing tools you can quickly draw geometry that resembles a desired shape, then, by
adding constraints and dimensions, you can obtain the final geometry.

A dimension (or constraining dimension) is a requirement on geometric entities that


has a value, for example the distance between vertex 3 and edge 7 should be 5[m]. You
may also define a dimension using an expression that may include global parameters,
for example A*5[m] that depends on the parameter A. A constraint is a requirement on

20 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


geometric entities that does not have a value; for example, a requirement that edges 9
and 11 should be perpendicular.

When you apply a constraint or dimension feature, the software immediately adjusts
the drawing to satisfy the applied feature. It does this by adjusting the values of the
input fields of the geometric features that created the objects. The constraints and
dimensions are visualized with symbols and arrows in the Graphics window.

ENABLING THE CONSTRAINTS AND DIMENSIONS FUNCTIONALITY


The constraint and dimension functionality is automatically enabled when you add a
constraint or dimension feature to a 2D geometry sequence using the buttons in the
Constraints and Dimensions sections in the Sketch toolbar, and from the context menus
in the Graphics and Model Builder windows. To manually enable the use of constraints
and dimensions in a 2D geometry or part, or work plane, go to the Settings window
for the Geometry or Plane Geometry node and set Use constraints and dimensions to On.
In addition to enabling the use of constraint and dimension features, this check box
also enables the editing of objects that result from previous geometric operations by
dragging of vertices and edges in the Graphics window. Note that turning this
functionality on for a geometry that consists of a very large number of edges and
vertices may slow down the sketch visualization, and it is therefore not recommended.

To enable constraints and dimensions by default in new models make sure that the Use
in new geometries check box is selected on the Geometry>2D Constraints and Dimensions
page in the Preferences dialog box.

When you open an existing model, the constraint and dimension features in the model
are normally active. To change this behavior clear the Use when opening a model that
uses constraints and dimensions check box on the Geometry>2D Constraints and
Dimensions page in the Preferences dialog box. After this, when you open a model that
uses constraints and dimensions you will get a question whether you want to disable
the use of constraints and dimensions. If you answer yes, the constraint and dimension
features will be loaded, but they will not have any effect.

If you want to avoid that dimension and constraint features modify the input fields of
a geometry feature click the Constrain ( ) button (visible only when the use of
constraints and dimensions is enabled) to the right of the text field in the Settings
window of the feature. This locks the text field (the Constrain button icon changes into
to accept only values or expressions that are entered directly, so that the text field
now becomes a built-in dimension. In some cases this is also indicated in the Graphics
window by the built-in dimensions being visualized with arrows.

CONSTRAINT AND DIMENSION FEATURES | 21


Constraints and dimensions can be applied to just about any geometry object, for
example to the output of features you have added from the Model Builder, and the
output of features such as the Union operation. The following features create objects
that cannot be modified using constraints or dimensions:

• Polygon where the data source is not Table


• Interpolation Curve where the data source is not Table or Relative tolerance is not 0
• Rectangle, Square, Circle, Ellipse using layers
• Parametric Curve
• Cross Section
• Edit Object
• Import
• Part Instance
• Partition Objects, Partition Domains, and Partition Edges
• Tangent

Note that even when an object cannot be modified by a constraint or dimension


feature, its entities can be used as input for such a feature together with entities that
can be modified.

When applying a constraint or dimension to a straight or circular edge, the entire line
or full circle is usually considered. For example, a dimension that constrains the
distance between a vertex and a straight edge really constrains the distance between the
vertex and the straight line underlying the edge.

CREATING CONSTRAINT AND DIMENSION FEATURES


When you are creating a drawing in sketch mode — that is, the Sketch button is active;
see also The Sketch Visualization — activate the Snap to Geometry ( ) and
Constrain ) buttons in the Draw Settings group of the Sketch toolbar to
automatically generate constraints as you draw curve segments using the geometry
primitives. For example, a Coincident constraint is automatically applied when a vertex
is snapped to an existing vertex, and Perpendicular and Tangent constraints may be
applied where appropriate between curve segments as you draw them.

When applying constraint and dimension to a geometry it is recommended to add the


constraints before the dimensions. The applied constraints and dimensions appear as
feature nodes in the geometry sequence and the corresponding symbols are displayed
in the Graphics window. You can create constraint and dimension features by using the

22 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


toolbar buttons from the Sketch toolbar or the contextual menu in the Graphics
window, as described below in the sections Creating Constraints and Creating
Dimensions, or by using the contextual menu of a Geometry or Plane Geometry node
in the Model Builder. By the latter method you first add a constraint or dimension
feature to the geometry sequence, then you select the input entities in its Settings
window. When assigning the selections in the Settings window, note that the
numbering of the vertices and edges in the sketch visualization (see The Sketch
Visualization) sometimes differs from the numbering used in the nonsketch
visualization. After building the feature the symbol for the constraint will appear the
Graphics window.

CREATING CONSTRAINTS
You can add a constraint using the buttons from the Sketch toolbar by one of the
following methods:

• Click the Constraint ( ) button in the Sketch toolbar, also available from the
right-click context menu in the Graphics window, to enter the smart constraint
mode. In this mode, you can start with selecting edges and vertices in the Graphics
window. When you have selected a sufficient number of entities, a constraint symbol
will appear next to the mouse pointer. This symbol indicates a suggested constraint
for the selected entities. If you are satisfied with this suggestion, move the symbol
to the desired position on the canvas and left-click to place it there. This will also
add the constraint feature node to the geometry sequence, and the geometry will
be rebuilt so that you see the effect of the constraint. You can drag the symbol
afterward to adjust its position. To select a different type of constraint from the one
suggested, click the button of another constraint, from the Sketch toolbar or from
the context menu displayed after right-clicking in the Graphics window, before
placing the symbol. If a sufficient number of entities are selected for this new
constraint, the symbol for the constraint will appear immediately at a default
position, and the constraint feature node will be added to the geometry sequence.
The smart constraint mode remains active after each applied constraint until you
click the Constraint button again, or press Esc.
• Click a button (other than Constraint) from the Constraint group of the Sketch
toolbar, to select a specific constraint. If you have already selected some entities you
can also select an applicable constraint from the context menu displayed when you
right-click in the Graphics window. If the preselected entities are sufficient for
applying the constraint, the symbol for the constraint will appear immediately at a
default position, and the constraint feature node will be added to the geometry
sequence. Otherwise, when you have selected a sufficient number of entities, the

CONSTRAINT AND DIMENSION FEATURES | 23


constraint symbol will appear under the pointer. Move the symbol to the desired
position on the canvas and click to place it there. The feature node for the constraint
will be added to the geometry sequence, and the geometry will be rebuilt.

CREATING DIMENSIONS
You can add a dimension using the buttons from the Sketch toolbar by one of the
following methods:

• Click the Dimension ( ) button in the Sketch toolbar to enter the smart dimension
mode. In this mode, you can start with selecting edges and vertices in the Graphics
window. When you have selected a sufficient number of entities, a dimension
symbol will appear next to the mouse pointer. This symbol indicates a suggested
dimension for the selected entities (also considering the mouse pointer position in
relation to the selected entities). If you are satisfied with this suggestion, move the
symbol to the desired position on the canvas and click to place it there. This will also
add the dimension feature node to the geometry sequence. Change the dimension’s
value in the Settings window for the feature; then click Build Selected to see its effect.
To select a different type of dimension from the one suggested, click the button of
another dimension, from the Sketch toolbar or from the context menu displayed
after right-clicking in the Graphics window, before placing the symbol. If a sufficient
number of entities are selected for this new dimension, the symbol for the dimension
will appear immediately at a default position, and the dimension feature node will
be added to the geometry sequence. You can drag the symbol afterward to adjust
its position. The smart dimension mode remains active after each applied dimension
until you click the Dimension button again, or press Esc.
• Click a button (other than Dimension) from the Dimensions group of the Sketch
toolbar, to select a specific dimension. If you have already selected some entities you
can also select an applicable dimension from the context menu displayed when you
right-click in the Graphics window. If the preselected entities are sufficient for
applying the dimension, the symbol for the dimension will appear immediately at a
default position, and the dimension feature node will be added to the geometry
sequence. Otherwise, when you have selected a sufficient number of entities, the
dimension symbol will appear under the pointer. Move the symbol to the desired
position on the canvas and click to place it there. This will also add the dimension
feature node to the geometry sequence. Change the dimension’s value in the
Settings window for the feature, then click Build Selected to see its effect.

24 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


CONSTRAINT AND DIMENSION SYMBOLS
In the Graphics window the constraint and dimension features are visualized with
symbols, arrows, and dimension values. These are displayed when the sketch
visualization (see The Sketch Visualization) is turned on. To turn on sketch
visualization click the Sketch ( ) button on the Geometry, Sketch, or Work Plane
toolbars. You can use the constraint and dimension symbols in the Graphics window
in the following ways:

• When you hover over a symbol, it will be highlighted in red, together with the
geometric entities it acts on. The name of the constraint or dimension feature
appears in the top-left corner of the Graphics window. To turn off the display of the
name when hovering over constraint and dimension symbols, clear the Show
information on hover check box on the Graphics>Interaction>Hovering page in the
Preferences dialog box.
• Use the scroll wheel to cycle through overlapping symbols.
• Drag the symbol to change its position.
• Double-click the symbol to select the corresponding feature node in the geometry
sequence, so that its settings are shown in the Settings window. For a dimension,
this also gives focus to the dimension value text field.
• Click to select the symbol. Hold down the Ctrl key to select several symbols.
Selected symbols are blue in the Graphics window.
• Click the Delete ( ) toolbar button or press the Delete key to delete the selected
constraints and dimensions.

STATUS OF THE CONSTRAINTS AND DIMENSIONS


Before any constraints or dimensions are applied to a geometry it is possible to grab
any of the edges or points of the geometry and move it around in all directions. In this
state the geometry is underdefined. All geometric entities are possible to move, and
they have a gray color in the Graphics window.

As you add constraints or dimensions to the geometry, the software automatically


modifies the geometry and computes the remaining degrees of freedom — that is, the
directions in which it is still possible to move the geometric entities. The edges and
vertices that are not possible to move become black in the Graphics window to signify
that they are uniquely defined. In this state the geometry is still underdefined.

When a sufficient number constraints and dimensions are added, all degrees of
freedom become locked, so that none of the vertices or edges can be moved. In this
state all geometric entities are black and the geometry is now well defined.

CONSTRAINT AND DIMENSION FEATURES | 25


Adding further dimensions to the geometry may cause it to be overdefined. In such a
state, the geometric entities are colored magenta in the Graphics window. Note that
entities might also be colored magenta due to other problems (for example, in case a
constraint cannot be applied to the selected entities).

The overall status of the applied constraints and dimensions is also indicated in the
Settings window for the Geometry or the Plane Geometry node, at the bottom of the
Constraints and Dimensions section. The following status messages can appear there:

TABLE 2-1: CONSTRAINT AND DIMENSION STATUS MESSAGES.

STATUS DESCRIPTION

Underdefined There are too few constraints and dimensions to define


the geometry uniquely. Add more constraints and
dimensions.
Well defined The constraints and dimensions define the geometry
uniquely, and they do not contradict each other. Note
that redundant constraints are accepted in a
well-defined geometry, but not redundant dimensions.
Overdefined There are too many dimensions. Remove dimensions to
get a well defined geometry.
Overdefined and There are some conflicting or redundant constraints/
underdefined dimensions but the geometry is not uniquely defined.
Inconsistent The software was unable to satisfy the constraints and
dimensions, but a solution might exist.
Need X more constraints/ Add X constraints/dimensions to get a well defined
dimensions geometry.
Y rigid body degrees of Of the X remaining degrees of freedom, Y degrees of
freedom freedom are rigid body motions (translation and
rotation of the whole geometry).
X too many constraints/ Remove X constraints/dimensions to get a well defined
dimensions geometry.

Note that the status concerns the state of the geometry when it was last built, that is,
the geometry you see in the Graphics window.

Each constraint and dimension node in the Model Builder can have a warning subnode
that tells if the node is overdefined or inconsistent. When this happens, the software
tries to satisfy the other constraints and dimensions, ignoring the problematic ones.

26 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


BUILDING A SUBSET OF THE CONSTRAINT AND DIMENSION FEATURES
To troubleshoot an overdefined or inconsistent state for constraints and dimensions
and to find conflicting constraints or dimensions you can disable the corresponding
features in the geometry sequence. Select one or several nodes in the Model Builder,
then right-click the selected nodes and select Disable. Rebuild the geometry sequence
to see the effect.

Another option is to change how the constraint and dimension features are built in the
geometry sequence. To do this, in the Settings window for the Geometry or the Plane
Geometry node, in the Constraints and Dimensions section, the Constraint and dimension
features to build list provides the following options:

• All: This option means that all constraint and dimension features in the sequence are
applied, also the features that come after the feature which you are building up to.
This is the default setting.
• None: Use this option to turn off the build of constraint and dimension features. The
corresponding feature nodes are grayed out in the geometry sequence. Note that
built-in dimensions defined by the geometric primitive features and other features
may still apply.
• Up to build target: With this option selected only the constraint and dimension
features up to the feature you are building up to are applied to the geometry.

MEASURING DIMENSIONS
Dimensions are created by default as constraining dimensions that are treated as a
requirement on the drawing. In the settings for a dimension you can change it to
become a measuring dimension by toggling the Constrain button from the locked
padlock ( ) to the open padlock ( ). A measuring dimension is not imposing a
requirement on the entities it applies to, but rather it is updated according to the other
features in the geometry sequence. In the Graphics window, measuring dimensions are
displayed in a blue color that is lighter than that of the constraining dimensions.
Measuring dimensions are useful when you want to know the value of dimension in
the drawing but adding a constraining dimension would overdefine the geometry.

DIMENSION PARAMETERS
To use the value of a dimension as a parameter in other geometry and nongeometry
features select the Create measuring parameter check box in the settings for the

CONSTRAINT AND DIMENSION FEATURES | 27


dimension. This setting is available for both constraining and measuring dimensions.
The following conditions apply when using dimension parameters:

• You can use a dimension parameter in the expression for another dimension’s value,
as well as expressions in other geometry features, within the same 2D geometry
sequence. The geometry feature where you use the dimension parameter may come
above the dimension feature that defines the parameter.
• When used in a geometry feature in the same 2D geometry sequence, the expression
containing the dimension parameters must be linear in the dimension parameters.
For example, if A is a parameter defined in a Global Definitions>Parameters node and
geom1.dist3 is a dimension parameter, you can enter the expression
2+A^2*geom1.dist3, but not 2+A^2*geom1.dist3^2.

• The Condition expression in If and Else If features does not support dimension
parameters.
• You can use a dimension parameter that is defined by a feature in a work plane’s
plane geometry sequence in expressions in 3D geometry features that come below
the work plane feature.
• You can use dimension parameters created in a component in expressions in
nongeometry features in that component as well as in other components, for
example in physics, mesh, and materials settings.
• You can use dimension parameters created in a component in features under a Study,
Results, and Global Definitions>Materials nodes.
• When entering expressions in a text field press Ctrl+Space to display a menu where
you find available dimension parameters under Geometric dimensions.
• For dimensions that define a parameter, the name of the dimension parameter is
displayed in the Graphics window, in the dimension’s label.

HELP POINTS
For some constraint and dimension features the Settings window contains a section
Help Points where you can specify coordinates for the help points on curved edges. The
help points are used as initial guesses when solving the constraint or dimension. More
specifically, when there are several solutions to a constraint or dimension, the software
chooses the solution that is closest to the help points. When you add a constraint or
dimension using a toolbar button, which is the recommended way, the help points are
based on the position of the mouse click for the edge selection. When you add a
constraint or dimension using the context menu in the Model Builder window the
coordinates for the help points are instead set to (0,0), which may sometimes result in

28 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


a solution that is not desired. The software updates the help point coordinates when
the geometry is built, so that the help points correspond to the found solution.

Angle
Use the Angle dimension to specify the angle between two edges. The specified angle
is applied between the tangent rays at the point of intersection for the two curves
underlying the edges.

Add an Angle dimension as follows:

1 Click the Angle ( ) toolbar button.


2 Select two edges, or a vertex that has exactly two adjacent edges.
3 Move the mouse pointer to select one of the four angular sectors to measure, and
to adjust the radial position of the circular arrow symbol.
4 Click to place the symbol.
5 In the Settings window for Angle change the value in the Angle text field.
6 Click Build Selected to rebuild the geometry with the new value.
The Settings window for Angle contains the following sections:

• First Ray: Change the selection for the first edge. The Reverse direction check box
determines the direction of the edge's tangent ray at the intersection point.
• Second Ray: Change the selection for the second edge. The Reverse direction check
box determines the direction of the edge's tangent ray at the intersection point.
• Dimension Value:
- Adjust the value of the angle. The angle is measured from the first tangent ray to
the second tangent ray in the counterclockwise direction.
- Toggle the Constrain button to switch between using the dimension as a
constraining dimension ( , default) or measuring dimension ( ). The value
of a measuring dimension is not imposed as a requirement to the drawing.
Instead it is updated according to other dimensions and constraints in the
geometry sequence. For more information see Measuring Dimensions.
- Select the Create measuring parameter check box to generate a parameter for the
dimension. Edit the name displayed in the Parameter name text field. When in
sketch visualization mode, the parameter name is displayed in the dimension’s

CONSTRAINT AND DIMENSION FEATURES | 29


label in the Graphics window. Use dimension parameters in expressions in
geometry and other features as described in Dimension Parameters.
• Help Points: Change the help point coordinates for the two edges. These are used as
initial guesses when computing a point of intersection (see Help Points).

Coincident
Use the Coincident constraint to constrain two geometric entities to coincide with
each other. Depending on the type of entities selected for the constraint the following
conditions may apply:

• A vertex coincides with a straight edge if the vertex lies on the line.
• A vertex coincides with a circular edge if the vertex lies on the circle.
• A vertex coincides with a spline edge if the vertex lies on the spline parameterization
(but possibly outside the edge's parameter interval).
• Two straight edges coincide if they lie on the same line.
• Two circular edges coincide if they lie on the same circle.
• Two spline edges coincide if they have the same spline parameterization (but
possible different parameter intervals).

Add a Coincident constraint as follows:

1 Click the Coincident ( ) toolbar button.


2 Select two vertices or edges, or one vertex and one edge.
3 Move the mouse pointer to position the coincident symbol.
4 Click to place the symbol.

The Settings window for Coincident contains the following sections:

• Geometric Entity Selection: Change the selected entities and their type.
• Help Points: Change the help point coordinates for the selected entities. These are
used as initial guesses when making a vertex coincident with a curved edge (see Help
Points).

Concentric
Use the Concentric constraint to constrain circular edges to have the same center, or
to constrain the center point of circular edges and vertices to coincide.

30 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


Add a Concentric constraint as follows:

1 Click the Concentric ( ) toolbar button.


2 Select circular edges and/or vertices.
3 Move the mouse pointer to position the concentric symbol.
4 Click to place the symbol.

The Settings window for Coincident contains the following sections:

• Geometric Entity Selection: Change the selected circular edges and vertices.

Directed Distance
Use the Directed Distance dimension to set the distance in a specified direction
between two geometric entities.

The directed distance from, or to, an edge is defined using a stationary point for the
directed point-to-point distance along the edge. For example, there are four ways to
define the directed distance between two circles.

Add a Directed Distance dimension as follows:

1 Click the Directed Distance ( ) toolbar button.


2 Select two vertices or curved edges, or a vertex and a curved edge.
3 Optionally, select a straight edge that specifies the direction in which the distance
between the entities is measured.
4 Move the mouse pointer to position the arrow symbol.
5 Click to place the symbol.
6 If you have not chosen a straight edge in Step 3 above, in the Settings window for
Directed Distance specify the components of the direction vector in the x and y text
fields.
7 If you have chosen a straight edge in Step 3, you can optionally change the Direction
for the dimension from Parallel with edge (default) to Perpendicular to edge.
8 Edit the value in the Distance text field. Note that the distance can also be negative
or zero.
9 Click Build Selected to see the effect of the new distance value.

The Settings window for Directed Distance contains the following sections:

• Geometric Entity Selection: Select the entities for the dimension.

CONSTRAINT AND DIMENSION FEATURES | 31


• Direction: Set the direction in which the distance is measured by selecting one of the
options from the Direction list box:
- Vector: Specify the direction by the x and y components of a direction vector. This
is the default option.
- Parallel with edge: The direction is parallel with the edge in the Straight edge
selection.
- Perpendicular to edge: The direction is perpendicular to the edge in the Straight
edge selection.

• Dimension Value:
- Enter the distance expression in the Distance text field. The distance may be
positive, negative, or zero. The sign does not matter when Direction is set to
Perpendicular to edge.
- Toggle the Constrain button to switch between using the dimension as a
constraining dimension ( , default) or measuring dimension ( ). The value
of a measuring dimension is not imposed as a requirement to the drawing.
Instead it is updated according to other dimensions and constraints in the
geometry sequence. For more information see Measuring Dimensions.
- Select the Create measuring parameter check box to generate a parameter for the
dimension. Edit the name displayed in the Parameter name text field. When in
sketch visualization mode, the parameter name is displayed in the dimension’s
label in the Graphics window. Use dimension parameters in expressions in
geometry and other features as described in Dimension Parameters.
• Help Points: Change the help point coordinates for the selected entities. The help
points are used as the initial guess to determine which directed distance to measure
(see Help Points).

Distance
Use the Distance dimension to set the distance between two geometric entities. The
distance from, or to, an edge is defined using a stationary point for the point-to-point
distance along the edge. For example, there are four ways to define the distance
between two circles. When you apply it to two straight edges, the distance dimension
constrains the edges to be parallel. For a single edge, the distance is applied between
the endpoints for the edge.

Add a Distance dimension as follows:

32 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


1 Click the Distance ( ) toolbar button.
2 Select two vertices or edges, a vertex and an edge, or an edge.
3 Move the mouse pointer to position the arrow symbol.
4 Click to place the symbol.
5 In the Settings window for Distance edit the value in the Distance text field.
6 Click Build Selected to see the effect of the new distance value.

The Settings window for Distance contains the following sections:

• Geometric Entity Selection: Change the selected entities and their type.
• Dimension Value:
- Enter the distance expression in the Distance text field.
- Toggle the Constrain button to switch between using the dimension as a
constraining dimension ( , default) or measuring dimension ( ). The value
of a measuring dimension is not imposed as a requirement to the drawing.
Instead it is updated according to other dimensions and constraints in the
geometry sequence. For more information see Measuring Dimensions.
- Select the Create measuring parameter check box to generate a parameter for the
dimension. Edit the name displayed in the Parameter name text field. When in
sketch visualization mode, the parameter name is displayed in the dimension’s
label in the Graphics window. Use dimension parameters in expressions in
geometry and other features as described in Dimension Parameters.
• Help Points: Change the help point coordinates for the selected entities. The help
points are used as the initial guess to determine which distance to measure (see Help
Points).

Equal Distance
Use the Equal Distance constraint to constrain the distances between two pairs of
geometric entities to be equal. The distance from and to an edge is defined using a
stationary point for the point-to-point distance along the edge. For example, there are
four ways to define the distance between two circles.

The help points (the points where you clicked when selecting the edges) are used to
determine which distance to measure.

Add an Equal Distance constraint as follows:

1 Click the Equal Distance ( ) toolbar button.

CONSTRAINT AND DIMENSION FEATURES | 33


2 Select two vertices or edges, or a vertex and an edge.
3 Move the pointer to position the arrow symbol, then click to place the symbol for
the first pair of entities.
4 Again, select two vertices or edges, or a vertex and an edge.
5 Click to place the second arrow symbol.
The same label will be displayed with the arrow symbols to indicate the constraint.

The Settings window for Equal Distance contains the following sections:

• First Distance: Change the selected entities and their type for the first pair.
• Second Distance: Change the selected entities and their type for the second pair.
• Graphics: Edit the label displayed with the arrow symbol for the constraint.
• Help Points: Change the help point coordinates for the selected entities. The help
points are used as the initial guess to determine which distance to measure (see Help
Points).

Equal Radius
Use the Equal Radius constraint to constrains two circular edges to have the same
radius.

Add an Equal Radius constraint as follows:

1 Click the Equal Radius ( ) toolbar button.


2 Select a circular edge.
3 Move the pointer to position the arrow symbol, then click to place the symbol for
the first edge.
4 Select another circular edge.
5 Click to position the second arrow symbol.
The same label will be displayed with the arrow symbols to indicate the constraint.

The Settings window contains the following sections:

EDGE SELECTION
Change the selected entities.

GRAPHICS
Edit the label displayed with the arrow symbol for the constraint.

34 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


Horizontal
Use the Horizontal constraint to constrain straight edges to be parallel to the x-axis.

Add a Horizontal constraint as follows:

1 Click the Horizontal ( ) toolbar button.


2 Select straight edges.
3 Move the pointer to position the parallel symbol, then click to place it.

The Settings window for Horizontal contains the following section:

EDGE SELECTION
Change the selected entities.

Parallel
Use the Parallel constraint to constrain straight edges to be parallel.

Add a Parallel constraint as follows:

1 Click the Parallel ( ) toolbar button.


2 Select straight edges.
3 Move the pointer to position the parallel symbol, then click to place it.

The Settings window for Parallel contains the following section:

EDGE SELECTION
Change the selected entities.

Perpendicular
Use the Perpendicular constraint to constrain two straight edges to be orthogonal.

Add a Perpendicular constraint as follows:

1 Click the Perpendicular ( ) toolbar button.


2 Select two straight edges, or a vertex that has exactly two adjacent edges.
3 Move the pointer to position the perpendicular symbol, then click to place it.

The settings window for Perpendicular contains the following section:

• Edge Selection: Change the selected entities.

CONSTRAINT AND DIMENSION FEATURES | 35


Position
Use the Position dimension to specify the coordinates for a vertex.

Add a Position dimension as follows:

1 Click the Position ( ) toolbar button.


2 Select a vertex.
3 Click somewhere on the canvas to place the position symbol.
4 In the Settings window for Position edit the coordinates in the x and y text fields.
5 Click Build Selected to rebuild the geometry with the new coordinates for the vertex.

The Settings window for Position contains the following sections:

• Vertex Selection: Change the selected vertex.


• Coordinates:
- Edit the coordinate expressions.
- Toggle the Constrain buttons to switch between using the dimensions as
constraining dimensions ( , default) or measuring dimensions ( ). The value
of a measuring dimension is not imposed as a requirement to the drawing.
Instead it is updated according to other dimensions and constraints in the
geometry sequence. For more information see Measuring Dimensions.
- Select the Create measuring parameters check box to generate a parameter for the
dimensions. Edit the names displayed in the x parameter name and y parameter
name text fields. When in sketch visualization mode, the parameter names are
displayed in the dimension’s label in the Graphics window. Use dimension
parameters in expressions in geometry and other features as described in
Dimension Parameters.

Radius
Use the Radius dimension to set the radius for a circular edge.

Add a Radius dimension as follows:

1 Click the Radius ( ) toolbar button.


2 Select a circular edge.
3 Click somewhere on the canvas to place the arrow symbol.
4 In the Settings window for Radius edit the value in the Radius text field.

36 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


5 Click Build Selected to rebuild the geometry with the new radius.

The Settings window for Radius contains the following sections:

• Edge Selection: Change the selected circular edge.


• Dimension Value:
- Edit the radius expression.
- Toggle the Constrain button to switch between using the dimension as a
constraining dimension ( , default) or measuring dimension ( ). The value
of a measuring dimension is not imposed as a requirement to the drawing.
Instead it is updated according to other dimensions and constraints in the
geometry sequence. For more information see Measuring Dimensions.
- Select the Create measuring parameter check box to generate a parameter for the
dimension. Edit the name displayed in the Parameter name text field. When in
sketch visualization mode, the parameter name is displayed in the dimension’s
label in the Graphics window. Use dimension parameters in expressions in
geometry and other features as described in Dimension Parameters.

Tangent Constraint
Use the Tangent Constraint to constrain two edges to have a point of tangency. For
each edge, you can optionally specify an adjacent vertex as the point of tangency.

Add a Tangent Constraint as follows:

1 Click the Tangent Constraint ( ) toolbar button.


2 Select two edges (and optionally a vertex adjacent to each edge), or a vertex having
exactly two adjacent edges.
3 Click somewhere on the canvas to place the tangent symbol.

The Settings window for Tangent Constraint contains the following sections:

• First Edge: Change the selected edge. To set the point of tangency to a vertex, from
the Point of tangency list, choose Vertex, then activate the Vertex selection, and select
a vertex adjacent to the edge. With the default setting for Point of tangency,
Anywhere, the tangency can be applied anywhere on the edge.

CONSTRAINT AND DIMENSION FEATURES | 37


• Second Edge: Change the selected edge and point of tangency similarly as in the First
Edge section.
• Help Points: Change the help point coordinates for the selected edges. The help
points are used as the initial guess when computing the intersection of the edges if
a vertex has not been selected (see Help Points).

Total Edge Length


Use the Total Edge Length dimension to specify the total length for a set of edges. The
edges must form a chain and all lie on the same line, circle, or spline.

Add a Total Edge Length dimension as follows:

1 Click the Total Edge Length ( ) toolbar button.


2 Select edges that form a chain on the same line, circle, or spline.
3 Click somewhere on the canvas to place the arrow symbol.
4 In the Settings window for Total Edge Length edit the value in the Length text field.
5 Click Build Selected to rebuild the geometry with the new length.

The Settings window for Total Edge Length contains the following section:

• Edge Selection: Change the selected edges.


• Dimension Value:
- Edit the length expression.
- Toggle the Constrain button to switch between using the dimension as a
constraining dimension ( , default) or measuring dimension ( ). The value
of a measuring dimension is not imposed as a requirement to the drawing.
Instead it is updated according to other dimensions and constraints in the
geometry sequence. For more information see Measuring Dimensions.
- Select the Create measuring parameter check box to generate a parameter for the
dimension. Edit the name displayed in the Parameter name text field. When in
sketch visualization mode, the parameter name is displayed in the dimension’s
label in the Graphics window. Use dimension parameters in expressions in
geometry and other features as described in Dimension Parameters.

Vertical
Use the Vertical constraint to constrain straight edges to be parallel to the y-axis.

38 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


Add a Horizontal constraint as follows:

1 Click the Vertical ( ) toolbar button.


2 Select straight edges.
3 Move the pointer to position the parallel symbol, then click to place it.

The Settings window for Vertical contains the following section:

EDGE SELECTION
Change the selected entities.

x-Distance
Use the x-Distance dimension to set the distance in the x direction between two
geometric entities. The x-distance from or to an edge is defined using a stationary
point for the point-to-point x-distance along the edge. For example, there are four
ways to define the x-distance between two circles.

Add an x-distance dimension as follows:

1 Click the x-Distance ( ) toolbar button.


2 Select two vertices, two curved edges, or a vertex and a curved edge.
3 Click somewhere on the canvas to place the arrow symbol.
4 In the Settings window for x-Distance edit the value in the Distance text field. Note
that the distance can also be negative or zero.
5 Click Build Selected to rebuild the geometry with the new distance value.

The Settings window for x-Distance contains the following sections:

• Geometric Entity Selection: Change the selected entities and their type.
• Dimension Value:
- Enter the distance expression in the Distance text field. The distance may be
positive, negative, or zero.
- Toggle the Constrain button to switch between using the dimension as a
constraining dimension ( , default) or measuring dimension ( ). The value
of a measuring dimension is not imposed as a requirement to the drawing.

CONSTRAINT AND DIMENSION FEATURES | 39


Instead it is updated according to other dimensions and constraints in the
geometry sequence. For more information see Measuring Dimensions.
- Select the Create measuring parameter check box to generate a parameter for the
dimension. Edit the name displayed in the Parameter name text field. When in
sketch visualization mode, the parameter name is displayed in the dimension’s
label in the Graphics window. Use dimension parameters in expressions in
geometry and other features as described in Dimension Parameters.
• Help Points: Change the help point coordinates for the selected entities. The help
points are used as the initial guess to determine which x-distance to measure (see
Help Points).

y-Distance
Use the y-Distance dimension to set the distance in the y direction between two
geometric entities. The y-distance from or to an edge is defined using a stationary
point for the point-to-point y-distance along the edge. For example, there are four
ways to define the y-distance between two circles.

Add a y-distance dimension as follows:

1 Click the y-Distance ( ) toolbar button.


2 Select two vertices, two curved edges, or a vertex and a curved edge.
3 Click somewhere on the canvas to place the arrow symbol.
4 In the Settings window for y-Distance edit the value in the Distance text field. Note
that the distance can also be negative or zero.
5 Click Build Selected to rebuild the geometry with the new distance value.

The Settings window for y-Distance contains the following sections:

• Geometric Entity Selection: Change the selected entities and their type.
• Dimension Value:
- Enter the distance expression in the Distance text field. The distance may be
positive, negative, or zero.
- Toggle the Constrain button to switch between using the dimension as a
constraining dimension ( , default) or measuring dimension ( ). The value
of a measuring dimension is not imposed as a requirement to the drawing.

40 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


Instead it is updated according to other dimensions and constraints in the
geometry sequence. For more information see Measuring Dimensions.
- Select the Create measuring parameter check box to generate a parameter for the
dimension. Edit the name displayed in the Parameter name text field. When in
sketch visualization mode, the parameter name is displayed in the dimension’s
label in the Graphics window. Use dimension parameters in expressions in
geometry and other features as described in Dimension Parameters.
• Help Points: Change the help point coordinates for the selected entities. The help
points are used as the initial guess to determine which y-distance to measure (see
Help Points).

CONSTRAINT AND DIMENSION FEATURES | 41


Geometry Representation
Working with the CAD Kernel
The component of the COMSOL Multiphysics® software that is used to represent,
build, and manage the interactions between geometric objects is the geometric kernel
or geometric modeler. There are two kernels used by the software, the COMSOL
kernel, and the CAD kernel (the Parasolid® kernel) that is included with the CAD
Import Module, the Design Module, and LiveLink™ products interfacing CAD
packages.

With a license for the Design Module the software defaults to the CAD kernel for
representing the geometry. You need to use the CAD kernel to apply the geometry
features included with this module, for example the defeaturing and repair tools, as
well as to import 3D geometries using various 3D CAD file formats. Exceptions are
the constraint and dimension features that do not require the CAD kernel.

The 3D operations and primitives listed in Table 2-2 do not support the CAD kernel
— they always use the COMSOL kernel. However, an automatic conversion is
performed for these objects before they are used as input to geometry features that
require the CAD kernel, see Converting Objects to CAD Kernel Representation.
TABLE 2-2: 3D GEOMETRY FEATURES THAT DO NOT SUPPORT THE PARASOLID GEOMETRY KERNEL.

FEATURE NAME FEATURE NAME

Bezier Polygon Point


Eccentric Cone Polygon
Extrude Pyramid
Helix Revolve
Hexahedron Sweep
Interpolation Curve Tetrahedron
Parametric Curve Torus
Parametric Surface Work Plane

CHANGING THE GEOMETRIC KERNEL


To switch between geometric kernels, you can click the Geometry node, then in its
Settings window, from the Geometry representation list choose either the CAD kernel or
COMSOL kernel.

42 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


When you change the Geometry representation setting, all nodes that support the CAD
kernel are marked as edited with an asterisk (*) in the upper-right corner of the node’s
icon. To rebuild the geometry using the new kernel, click the Build All button ( ).
To avoid re-solving an already solved model, you can click the Update Solution button
( ) in the Study toolbar to map the solutions from the geometry represented by the
CAD kernel to the new geometry represented by the COMSOL kernel.

If you solve a model using the CAD kernel, it is not possible to view and
postprocess the solution if you open it in a COMSOL Multiphysics
session where a license for the CAD Import Module, Design Module, or
one of the LiveLink for CAD products is not available, unless, before
saving the model, you change the geometry representation to COMSOL
kernel and update the solution. This is possible to do only for 3D
geometry sequences that do not contain geometry features that require
the CAD kernel.

When you create a new model, its default geometry representation is controlled by the
preference setting Geometry>Geometry representation>In new geometries.

When you open an existing model, you normally use the geometry representation used
in the model. To always get the possibility to convert the geometry to the COMSOL
kernel, change the preference setting Geometry>Geometry representation>When
opening an existing model to Convert to COMSOL kernel.

USING THE DESIGN MODULE BOOLEAN OPERATIONS


The Design Module includes 3D Boolean geometry operations that may in some cases
be more successful in computing the resulting geometry, for example when building
the union of objects that intersect or have gaps. By specifying an absolute tolerance
that corresponds to the width of the overlap or gap, the intersecting region is collapsed
or the gap is closed when building the union operation. To find appropriate tolerance
values use the Detect Interferences tool.

If your license includes the Design Module and the geometry representation is set to
use the CAD kernel, you can select the Design Module Boolean operations check box in
a 3D Geometry node’s Settings window to use the Boolean operations available with
the Design Module. When you open an existing model, you normally use the Boolean
operations used in the model. To always use the Design Module Boolean operations
when adding a new component or part, select the preference setting Geometry>3D
Design Module Boolean operations>Use in new geometries.

GEOMETRY REPRESENTATION | 43
Converting Objects to COMSOL Kernel Representation
To convert CAD objects (geometric objects represented by the CAD kernel) to objects
represented by the COMSOL kernel, from the Geometry toolbar, Conversions menu,
select Convert to COMSOL ( ).

The COMSOL geometry file format (.mphbin, or .mphtxt) can contain


geometric objects saved in both the CAD kernel and COMSOL kernel
representations. To import geometry from such a file to a geometry
sequence that uses the COMSOL kernel, you need to convert geometry
objects to the COMSOL representation before exporting to the file.

CONVERT TO COMSOL
Select the objects that you want to convert in the Graphics window. The selected
objects are displayed in the Input objects list.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.

44 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Converting Objects to CAD Kernel Representation


If the current geometry representation for the geometry sequence is CAD kernel, an
automatic conversion of COMSOL objects to CAD objects takes place before using
the objects in Boolean operations and before using the objects in the Convert to Solid,
Convert to Surface, Convert to Curve, and Convert to Point operations. This ensures that
the CAD kernel is used in the abovementioned operations. This conversion is also
performed when COMSOL objects are used as input to features that require the CAD
kernel, for example the Knit to Solid feature

An automatic conversion to CAD objects is also performed before exporting geometry


in the ACIS®, Parasolid®, STEP, and IGES file formats.

If the automatic conversion cannot be performed, the geometry operation is


performed by the COMSOL kernel. For example, geometry objects created from a
mesh cannot be converted to CAD kernel representation. Other examples of geometry
objects that cannot be converted to CAD representation include objects that have an
edge adjacent to three or more isolated faces, or objects that have a face bounded by
an edge loop that intersects itself.

The automatic conversion to CAD kernel representation is not performed if one of the
input objects to the Boolean or conversion operation is the result of a previous Convert
to COMSOL operation.

GEOMETRY REPRESENTATION | 45
Importing and Exporting CAD Files
Importing 3D CAD Files
To import geometry objects from a 3D CAD file, from the Home or the Geometry
toolbar, click Import ( ). In the Import section of the Settings window, select 3D CAD
file from the Geometry import list. You can also skip this step as the type of the selected
file is automatically recognized by the code. Click Browse to locate the file to import,
or enter the path to the file. Before clicking the Import button consider to review and
configure the import settings. If you have changed some settings after importing a file,
the file is automatically reimported when you click a build button.

The imported geometry objects are represented by the CAD kernel, see Working with
the CAD Kernel, which is the geometric kernel used by the CAD Import Module,
Design Module, and LiveLink™ products interfacing CAD packages.

Some 3D CAD formats use periodic parameterization for edges and faces. For
example, a full-revolution cylindrical edge or face appears seamless in the CAD
program. During import edges or faces that have a periodic parameterization are cut
in two halves by inserting new vertices and edges. This is done because the mesh
algorithms do not support periodic entities. You can ignore such inserted edges using
an Ignore Edges feature from Virtual Operations.

SUPPORTED FORMATS
The CAD import supports the following 3D CAD formats:
TABLE 2-3: SUPPORTED 3D CAD FILE FORMATS.

FILE FORMAT NOTES FILE EXTENSIONS SUPPORTED VERSIONS

ACIS® 1 .sat, .sab Up to 2023 1.0


AutoCAD® 1, 2 .dwg, .dxf 2.5-2024
CATIA® V5 2, 3 .CATPart, R8 to R2023
.CATProduct
IGES 1 .igs, .iges Up to 5.3
Inventor® assembly 1, 2 .iam 11-2024
Inventor® part 1, 2, .ipt 6-2024
NX™ 1, 4 .prt Up to 2306
Parasolid® 1 .x_t, .x_b Up to V36.0
PTC Creo Parametric™ 1 .prt, .asm 1.0-10.0

46 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


TABLE 2-3: SUPPORTED 3D CAD FILE FORMATS.

FILE FORMAT NOTES FILE EXTENSIONS SUPPORTED VERSIONS

PTC Pro/ENGINEER® 1 .prt, .asm 16 to Wildfire 5


® .sldprt, .sldasm
SOLIDWORKS 1, 2, 5 98-2023
STEP 1 .step, .stp AP203E1, AP214,
AP242
Note 1: This format requires a license for one of the CAD Import Module, Design
Module, or LiveLink product for a CAD package.

Note 2: This format is available only on supported Windows® operating systems.

Note 3: This format requires, in addition to the CAD Import Module, or Design
Module, or a LiveLink product for a CAD package, a license for the File Import for
CATIA V5 module.

Note 4: Support for the NX™ file format is available only on supported Windows® and
Linux operating systems.

Note 5: Embedded parts in assemblies are not supported. To import such an assembly,
first convert the embedded parts to external parts.

ASSOCIATIVITY
When possible the import maintains associativity for the imported geometry objects,
so that when the CAD file is reimported the settings applied to the geometric entities,
for example physics or material settings, are retained. To maintain associativity the
import relies on information in the CAD file that uniquely identifies the geometry
objects and their entities, such as faces, edges, and points. This information is usually
included in the CAD file if the geometry is saved in the format of the CAD software
where it was created, but not when the geometry is exported to another CAD format.
When reimporting a CAD file the import automatically tries to identify and match all
geometry objects and their entities to the previous version. This may fail if the
topology (structure) of the geometry has changed since the last import.

IMPORTING AND EXPORTING CAD FILES | 47


Note: To ensure that associativity is maintained when reimporting a CAD file work
with CAD files saved in the originating CAD software’s format, and avoid changes to
the topology (structure) of the geometry. When an associative import is not possible
use coordinate-based selections, such as the Ball, Box, and Cylinder selections in 3D
(see Creating Selections From Geometric Primitives and Operations in the COMSOL
Multiphysics Reference Manual).

LENGTH UNIT
In the Length unit list, select From CAD document to change the geometry’s length unit
to the unit in the file (if the file has a length unit). Select From COMSOL to keep the
geometry’s length unit and scale the objects in the file to the geometry’s unit.

OBJECTS TO IMPORT
Select the types of objects to import using the Solids, Surfaces, and Curves and points
check boxes.

If the Surfaces check box is selected, you can choose how COMSOL imports the
surfaces using the list under For surface objects:

• Choose Form solids (the default) to knit together surface objects to form solids. The
input surface objects must have manifold topology, and the operation can only form
solids with manifold topology. An example of a solid object with nonmanifold
topology is a solid that has an interior surface that separates two domains. A surface
object that contains an edge that is adjacent to more than one boundary is an
example of a surface object with nonmanifold topology.
• Choose Knit surfaces to form surface objects by knitting.
• Choose Do not knit to not form any surface or solid objects from the imported
surfaces.

For the Form Solids and Knit surfaces options select the Fill holes check box to generate
new faces to replace missing geometry.

To import wireframe geometry you need to select the Curves and points check box.
With this option, the Unite curve objects check box is selected by default to unite the
imported curve objects, which speeds up the rendering of the geometry.

48 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


IMPORT OPTIONS
The Absolute import tolerance is a length measured in the geometry’s unit after the
import. When importing 3D CAD files, the program merges geometric entities with a
distance smaller that this tolerance.

Select the Check imported objects for errors check box to check the validity of the
imported objects as the last stage of the import. Warning nodes appear with details
about the detected problems, if any. Use the Zoom to Selection button next to the
Entities list in a warning node to locate the problematic edges or faces. For information
on geometry problems that may occur see the Check feature.

If you select the Repair imported objects check box, the software tries to repair defects
and remove details smaller than the Absolute repair tolerance.

The option Simplify curves and surfaces is selected by default to simplify, within the
Absolute import tolerance, the underlying curve and surface manifolds of the imported
geometric entities. Importing objects with this option may improve both the
performance and reliability of geometric operations on some imported geometry, for
example it may help in some cases when Boolean operations on the imported objects
fail. Simplification means that the manifolds are converted where possible to analytical
form: linear, circular, and elliptical curves; and planar, spherical, cylindrical, conical,
and toroidal surfaces. Manifolds that are converted are B-spline curves and surfaces, or
certain surfaces generated by operations such as sweeping, revolving, and filleting.

If the Remove redundant edges and vertices check box is selected, edges and vertices that
are considered redundant, such as the edges of an imprint on a face, are removed
during synchronization.

When importing STEP files that contain multibody parts it can be useful to generate
object names that include both the body and the part names retrieved from the file.
Select how to name the objects imported from STEP files from the Import body names
list:

• Select Automatic to include the body names in the object name only for the
multibody parts.
• Select On to include the body names in the objects names for all imported parts.
• Select Off to not include the body names in the object names.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no

IMPORTING AND EXPORTING CAD FILES | 49


contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the objects consist of
available as selections in all applicable selection lists (in physics and materials settings,
for example), choose an option from the Show in physics list: All levels, Domain selection,
Boundary selection, Edge selection, or Point selection. The default is Domain selection,
which is suitable for use with materials and physics defined in domains. For use with a
boundary condition, for example, choose Boundary selection. These selections do not
appear as separate selection nodes in the model tree. Select Off to not make any
selection available outside of the geometry sequence.

Select the Individual objects selections check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence for each individual object in the geometry
file and for each relevant entity level. To also make all or one of the types of resulting
entities (domains, boundaries, edges, and points) that the objects consist of available
as selections in all applicable selection lists (in physics and materials settings, for
example), choose an option from the Show in physics list: All levels, Domain selection,
Boundary selection, Edge selection, or Point selection. The default is Domain selection, if
available, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

SELECTIONS GENERATED BASED ON INFORMATION IN THE CAD FILE


The following types of data from the CAD file are used to generate selection on the
imported geometry:

• Material assignments can generate objects selections that are named according to
the material names in the CAD file.
• Layer assignments of objects and entities, when supported by the CAD format, can
generate object, boundary, edge, and point selections that are named according to
the layer names in the CAD file.
• Color assignments to objects, faces, or edges can generate object, boundary, and
edge selections, respectively.

50 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


After the import the generated selections are displayed in the Settings window for the
Import node in sections named according to the entity level of the selections:

• Object Selections
• Boundary Selections
• Edge Selections
• Point Selections

Depending on which selections are generated, a subset of the above sections is


displayed. The selections are listed in tables with the following columns:

• Name: Here you can edit the selection name that is generated by the import. For
colors the generated names are of the type Color 1, Color 2, and so on, for materials
and layers the names from the CAD file are used.
• Name in file: This column contains the original name of the selection. To display this
column select the Show names from file check box above the table.
• Keep: Select the check box in this column to make the selection available in selection
lists for subsequent nodes in the geometry sequence.
• Physics: Select the check box in this column to make the selection available in all
applicable selection lists (in physics and materials settings, for example).
• Contribute to: If you want to make the objects or entities in the selection contribute
to a cumulative selection, select a cumulative selection from the Contribute to list
(the default, None, gives no contribution), or click the New Cumulative Selection
button under the table to create a new cumulative selection (see Cumulative
Selections in the COMSOL Multiphysics Reference Manual).

Click a row in a table to highlight the corresponding selection on the geometry in the
Graphics window. To help with identifying the color selections, these are highlighted
with the colors defined in the imported CAD file. To always highlight on the geometry
the color selections that you keep select from the Graphics toolbar Colors>Show
Selection Colors.

The selections listed in the Object Selections section that are made available for the
geometry sequence or physics setup are always available in all input selection lists,
including all applicable entity selection lists. For example, the object selection of a solid
object, generated for a material from the CAD file, automatically results in domain,
boundary, edge, and point selections with the same name, so that you can use it to
apply a boundary material, or a boundary condition. In contrast, a color assigned to a
face of a solid object in the CAD file results in a boundary selection that is displayed

IMPORTING AND EXPORTING CAD FILES | 51


in the Boundary Selections section, and it is available in all applicable boundary selection
lists, but not, for example, in any edge selection lists.

ASSIGNED ATTRIBUTES
Select the Construction geometry check box to make the resulting objects available only
in the feature’s geometry sequence. For more information see Construction
Geometry.

Exporting Objects to 3D CAD Formats


With a license for the Design Module you can export 3D geometry objects to the
ACIS® (version 2016 1.0), IGES (version 5.3), Parasolid® (version 36.0), and STEP
(version AP203) formats. To do this:

• right-click the Geometry node and select Export ( ), or


• in the Geometry toolbar click Export ( ).

Then, in the Export window, the File type list, select Parasolid binary file, Parasolid text
file, ACIS binary file, ACIS text file, IGES file, or STEP file. Use the Browse button to choose
the filename, or enter a filename including the path in the Filename field.

Next, select Export selected objects to export only chosen geometry objects or select
Export entire finalized geometry to export the resulting geometry of a Form Union or
Form Assembly operation.

The following limitations apply when exporting geometry objects to the


3D CAD formats mentioned in this section:

• Geometry objects that are created from mesh cannot be exported.


• Geometry objects that are the result of virtual geometry operations
that come after a Form Union or Form Assembly node in the geometry
sequence cannot be exported. The finalized geometry resulting from
the Form Union or Form Assembly node is exported instead.
• Geometry objects created with a license for the ECAD Import Module
from ECAD files imported with the options Ignore vertices with
continuous tangent and Eliminate short edges cannot be exported. In
this case the exported geometry objects contain the vertices and edges
removed by the import.

52 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


COMSOL objects are automatically converted to CAD objects before saving the file.

For details on which objects can be converted to CAD objects see


Converting Objects to CAD Kernel Representation.

To export the geometry to the specified file, click the Export ( ) button. A
confirmation message appears in the Messages window.

ADVANCED
When exporting to an ACIS file format choose the ACIS file format version. Available
versions are 4.0, 7.0, 2016 1.0 (default).

For the Parasolid, IGES, and STEP file formats select a Length Unit. A unit conversion
is carried out when the selected unit is different from the length unit of the geometry.
A unit conversion is not done for the default From geometry option.

The Parasolid binary and text formats do not allow coordinate values
larger than 500. Therefore you might have to change the export unit in
the Length unit list box to be able to export the geometry.

For the Parasolid file formats the option Split in manifold objects is selected by default
to make sure that the exported geometry objects are manifold objects. A nonmanifold
object is, for example, a solid with an interior boundary that separates two domains.
When exported using this option the solid is split along the interior boundary into two
separate objects. When exporting to the ACIS, IGES, and STEP formats nonmanifold
objects are always split.

IMPORTING AND EXPORTING CAD FILES | 53


Repairing and Defeaturing
When importing 3D CAD files, the default import settings ensure that the validity of
the imported objects is checked, and that defects are repaired when possible. In
addition to the checks and repair performed during import, the Design Module
provides operations for checking, repairing, and defeaturing 3D geometry objects, and
locating overlaps and gaps in imported CAD assemblies.

OPERATIONS FOR CHECKING AND REPAIRING 3D OBJECTS


Use the operations listed in the table below to check and repair geometry objects and
to detect interferences between objects:
TABLE 2-4: OPERATIONS FOR DETECTING DEFECTS IN AND REPAIRING 3D OBJECTS AND DETECTING
INTERFERENCES BETWEEN 3D GEOMETRY OBJECTS.

ICON NAME DESCRIPTION

Check Check CAD objects for faults, for example tolerance issues and
invalid entities
Detect Search for interferences, such as intersections, gaps, touches, and
Interferences containments, between objects
Repair Repair defects and remove small details from 3D objects

OPERATIONS FOR DEFEATURING


With the defeaturing tools listed in the table below you can search for and delete both
small details, such as short edges, small faces, sliver faces, and spikes, and larger details,
for example, fillets, chamfers, and cylindrical holes. You can also replace and detach a
selection of faces to form 3D objects.
TABLE 2-5: OPERATIONS FOR DEFEATURING 3D GEOMETRY OBJECTS.

ICON NAME DESCRIPTION

Delete Fillets Search for and delete fillets

Delete Holes Search for and delete holes

Delete Short Search for and collapse short edges


Edges
Delete Sliver Search for and delete slivers faces
Faces
Delete Small Search for and collapse small faces
Faces

54 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


TABLE 2-5: OPERATIONS FOR DEFEATURING 3D GEOMETRY OBJECTS.

ICON NAME DESCRIPTION

Delete Spikes Search for and delete spikes from faces

Detach Faces Detach faces to form a new object from them

Replace Faces Replace faces by growing surrounding faces or creating new faces

Check
To check the validity of CAD objects, from the Geometry toolbar, Defeaturing and
Repair ( ) menu, select Check ( ).

Select the objects that you want to check in the Graphics window. These then appear
in the Input objects list. If the geometry sequence includes user-defined selections
above the Check node, choose Manual to select objects, or choose one of the selection
nodes from the list next to Input objects. Click the Active button to toggle between
turning ON and OFF the Input objects selections.

If any problems are detected in the selected objects when building this feature,
warning nodes appear with details about the issues. In the warning nodes use the Zoom
to Selection button next to the Entities list to locate the faulty edges or faces.

Warnings on geometric entities are usually associated with objects imported from CAD
files, but could also be introduced by geometric operations, for example when
repairing an object with a tolerance that is too large. The presence of warnings does
not generally mean that the geometry is invalid and cannot be used for setting up a
simulation. However, the faulty entities may in some cases cause the failure of
geometric operations that involve these entities, and meshing of entities with certain
types of faults may fail. In the following you can read about two commonly occurring
class of faulty geometric entities, and how to repair these:

• Tolerance issues: The warning messages vertex not on edge, vertex not on face, edge
not on face belong to this category. These type of faults indicate that the topology
(structure) of the object is not correct locally, for example that an edge is not located
on the boundary where it is expected to be. You can often repair tolerance issues in
an object by applying the Repair operation with a tolerance that is larger than the
tolerance used for the import. Repair adjusts the tolerance of the entities where
required, and, if this fixes the issues, warning nodes will not be displayed after the
Repair node. In some cases it may also help to use the option Simplify curves and

REPAIRING AND DEFEATURING | 55


surfaces for the Repair operation. Note that increasing the repair tolerance too much
may lead to removing important details from the geometry. As an alternative to the
Repair operation you can also reimport the CAD file using a larger tolerance,
however the option to simplify curves and surfaces is not available in this case. For
more details see Repair, and Import Options.
• Invalid entities: The warning messages invalid curve or surface, self-intersecting
face, face-to-face inconsistency, self-intersecting curve or surface signify invalid
entities. If you encounter any of these faults after importing a geometry from a CAD
file you may need to repair the geometry to avoid problems with meshing. For
example:
- For face-to-face inconsistency faults on solid objects, try to repair the object using
the Repair face-to-face inconsistencies in solids option for the Repair feature.
- Try to replace the faulty face. Use the Delete operation to delete the face, then
use the Cap Faces operation to generate a new face in its place. Another solution
may be to use Delete Faces to delete and patch in one operation several connected
faces that have a fault.

Delete Fillets
Use the Delete Fillets tool to search for fillets of a specified radius and delete these from
an object. The faces forming the fillet are removed and the adjacent faces are extended
to cover the resulting wound.

Note that this defeaturing tool may not find all fillets on nonmanifold objects. An
example of a nonmanifold object is an object with several domains. Such an object can
for example result from a Union or a Partition operation. To remove the fillets make
sure to defeature the geometry objects before applying Boolean operations that result
in nonmanifold objects.

The Delete Fillets tool cannot delete fillets for which the adjacent faces cannot be
extended to cover the wound. The figure below shows an example of such fillets.

56 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


Applying the fillets on the highlighted edges deletes the annular face from the
geometry, which cannot be recreated if the fillets are to be deleted.

To open the Tools window for Delete Fillets, from the Geometry toolbar, Defeaturing and
Repair ( ) menu, select Delete Fillets ( ). You can also right-click the Geometry
node and select the same option from the context menu.

Note: When you are in the Tools window for Delete Fillets, you can at any time switch
to another defeaturing tool by clicking one of the corresponding buttons at the top of
the window.

DELETE FILLETS
Activate the Input objects selection by clicking the Active button to toggle between
and . Select the objects you want to examine in the Graphics window.
They appear in the Input objects list.

The Delete Fillets tool can only be applied to objects that are represented
by the Parasolid® geometry kernel, also called CAD objects.

In the fields Minimum fillet radius and Maximum fillet radius, enter the size of the fillets
you want to search for. When you click the Find Fillets button, a list of fillets with radii
between the given values is shown in the Fillet selection list.

To delete the found details, either click the Delete All button, or select a subset of the
found details in the list and click Delete Selected. Then, the selected details are deleted
from their objects, and a node corresponding to this operation is added to the
geometry branch of the model tree.

REPAIRING AND DEFEATURING | 57


If you want to modify the performed deletion operation, you can select the added node
in the geometry branch. Then, edit the node’s form that appears in the Settings
window. Click the Build Selected button ( ) to see the result of your edits. The
Settings window for Delete Fillets contains the additional settings described below.

To delete all fillets returned by the search, set the Deletion type to All fillets. You can
delete a subset of the found fillets by selecting them in the Fillet selection list, and
choosing Selected fillets in the Deletion type list.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

Delete Holes
Use this defeaturing tool to search for and delete cylindrical holes from an object. The
tool can find and delete both through or blind holes on solid as well as surface objects.
The faces forming the hole are deleted and the resulting wound is covered by
extending the adjacent faces.

Note that holes found on nonmanifold objects are not possible to delete. An example
of a nonmanifold object is an object with several domains. Such an object can for
example result from a Union or a Partition operation. To remove the holes make sure
to defeature the geometry objects before applying Boolean operations that result in
nonmanifold objects.

58 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


To open the Tools window for Delete Holes, from the Geometry toolbar, Defeaturing and
Repair ( ) menu, select Delete Holes ( ). You can also right-click the Geometry
node and select the same option from the context menu.

Note: When you are in the Tools window for Delete Holes, you can at any time switch
to another defeaturing tool by clicking one of the corresponding buttons at the top of
the window.

DELETE HOLES
Activate the Input objects selection by clicking the Active button to toggle between
and . Select the objects you want to examine in the Graphics window.
They appear in the Input objects list.

The Delete Holes tool can only be applied to objects that are represented
by the CAD kernel; see Converting Objects to CAD Kernel
Representation.

In the fields Minimum hole radius and Maximum hole radius, enter the size of the holes
you want to search for. When you click the Find Holes button, a list of holes with radii
between the given values is shown in the Hole selection list.

To delete the found details, either click the Delete All button, or select a subset of the
found details in the list and click Delete Selected. Then, the selected details are deleted
from their objects, and a node corresponding to this operation is added to the
geometry branch of the model tree.

If you want to modify the performed deletion operation, you can select the added node
in the geometry branch. Then, edit the node’s form that appears in the Settings
window. Click the Build Selected button ( ) to see the result of your edits. The
Settings window for Delete Holes contains the additional settings described below.

To delete all holes returned by the search, set the Deletion type to All holes. You can
delete a subset of the found holes by selecting them in the Hole selection list, and
choosing Selected holes in the Deletion type list.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no

REPAIRING AND DEFEATURING | 59


contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

Delete Short Edges


Use the Delete Short Edges tool to find edges shorter than a specified length, and then
to delete these by collapsing the edges.

Note that this defeaturing tool cannot find short edges on nonmanifold objects. An
example of a nonmanifold object is an object with several domains. Such an object can
for example result from a Union or a Partition operation. To avoid this situation
defeature the geometry objects before applying Boolean operations that result in
nonmanifold objects.

To open the Tools window for Delete Short Edges, from the Geometry toolbar,
Defeaturing and Repair ( ) menu, select Delete Short Edges ( ). You can also
right-click the Geometry node and select the same option from the context menu.

Note: When you are in the Tools window for Delete Short Edges, you can at any time
switch to another defeaturing tool by clicking one of the corresponding buttons at
the top of the window.

60 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


DELETE SHORT EDGES
Activate the Input objects selection by clicking the Active button to toggle between
and . Select the objects you want to examine in the Graphics window.
They appear in the Input objects list.

The Delete Short Edges tool can only be applied to objects that are
represented by the Parasolid® geometry kernel, also called CAD objects.

In the field Maximum edge length, enter the maximum length of the edges you want to
delete. When you click the Find Short Edges button, a list of edges with length smaller
that the given value is shown in the Short edge selection list.

To delete the found details, either click the Delete All button, or select a subset of the
found details in the list and click Delete Selected. Then, the selected details are deleted
from their objects, and a node corresponding to this operation is added to the
geometry branch of the model tree.

If you want to modify the performed deletion operation, you can select the added node
in the geometry branch. Then, edit the node’s form that appears in the Settings
window. Click the Build Selected button ( ) to see the result of your edits. The
Settings window for Delete Short Edges contains the additional settings described
below.

To delete all edges returned by the search, set the Deletion type to All short edges. You
can delete a subset of the found edges by selecting them in the Short edge selection list,
and choosing Selected short edges in the Deletion type list.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain

REPAIRING AND DEFEATURING | 61


selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

Delete Sliver Faces


Use the Delete Sliver Faces tool to search for high aspect ratio faces of a specified
maximum width. The tool deletes the selected sliver faces by collapsing these.

Note that this defeaturing tool cannot find sliver faces on nonmanifold objects. An
example of a nonmanifold object is an object with several domains. Such an object can
for example result from a Union or a Partition operation. To avoid this situation
defeature the geometry objects before applying Boolean operations that result in
nonmanifold objects.

To open the Tools window for Delete Sliver Faces, from the Geometry toolbar,
Defeaturing and Repair ( ) menu, select Delete Sliver Faces ( ). You can also
right-click the Geometry node and select the same option from the context menu.

Note: When you are in the Tools window for Delete Sliver Faces, you can at any time
switch to another defeaturing tool by clicking one of the corresponding buttons at
the top of the window.

DELETE SLIVER FACES


Activate the Input objects selection by clicking the Active button to toggle between
and . Select the objects you want to examine in the Graphics window.
They appear in the Input objects list.

The Delete Sliver Faces tool can only be applied to objects that are
represented by the Parasolid® geometry kernel, also called CAD objects.

In the field Maximum face width, enter the maximum width of the faces you want to
delete. When you click the Find Sliver Faces button, a list of faces with width smaller
that the given value are shown in the Sliver faces selection list.

62 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


To delete the found details, either click the Delete All button, or select a subset of the
found details in the list and click Delete Selected. Then, the selected details are deleted
from their objects, and a node corresponding to this operation is added to the
geometry branch of the model tree.

If you want to modify the performed deletion operation, you can select the added node
in the geometry branch. Then, edit the node’s form that appears in the Settings
window. Click the Build Selected button ( ) to see the result of your edits. The
Settings window for Delete Sliver Faces contains the additional settings described
below.

To delete all faces returned by the search, set the Deletion type to All sliver faces. You
can delete a subset of the found faces by selecting them in the Sliver face selection list,
and choosing Selected sliver faces in the Deletion type list.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

Delete Small Faces


Use the Delete Small Faces tool to find and delete faces of a specified maximum size.
The tool deletes the selected small faces by collapsing these.

Note that this defeaturing tool cannot find small faces on nonmanifold objects. An
example of a nonmanifold object is an object with several domains. Such an object can
for example result from a Union or a Partition operation. To avoid this situation

REPAIRING AND DEFEATURING | 63


defeature the geometry objects before applying Boolean operations that result in
nonmanifold objects.

To open the Tools window for Delete Small Faces, from the Geometry toolbar,
Defeaturing and Repair ( ) menu, select Delete Small Faces ( ). You can also
right-click the Geometry node and select the same option from the context menu.

Note: When you are in the Tools window for Delete Small Faces, you can at any time
switch to another defeaturing tool by clicking one of the corresponding buttons at
the top of the window.

DELETE SMALL FACES


Activate the Input objects selection by clicking the Active button to toggle between
and . Select the objects you want to examine in the Graphics window.
They appear in the Input objects list.

The Delete Small Faces tool can only be applied to objects that are
represented by the Parasolid® geometry kernel, also called CAD objects.

In the field Maximum face size, enter the maximum diameter of the faces you want to
delete. When you click the Find Small Faces button, a list of faces with diameter smaller
that the given value appears in the Small faces selection list.

To delete the found details, either click the Delete All button, or select a subset of the
found details in the list and click Delete Selected. Then, the selected details are deleted
from their objects, and a node corresponding to this operation is added to the
geometry branch of the model tree.

If you want to modify the performed deletion operation, you can select the added node
in the geometry branch. Then, edit the node’s form that appears in the Settings
window. Click the Build Selected button ( ) to see the result of your edits. The
Settings window for Delete Small Faces contains the additional settings described
below.

To delete all faces returned by the search, set the Deletion type to All small faces. You
can delete a subset of the found faces by selecting them in the Small face selection list,
and choosing Selected small faces in the Deletion type list.

64 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


SELECTIONS OF RESULTING ENTITIES
If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

Delete Spikes
A spike is a long and narrow protrusion on an edge or corner of a face defined by two
or three edges. Using the Delete Spikes tool you can search for and delete spikes from
an object, by collapsing the narrow face region defined by the spike.

To open the Tools window for Delete Spikes, from the Geometry toolbar, Defeaturing and
Repair ( ) menu, select Delete Spikes ( ). You can also right-click the Geometry
node and select the same option from the context menu.

Note: When you are in the Tools window for Delete Spikes, you can at any time switch
to another defeaturing tool by clicking one of the corresponding buttons at the top of
the window.

DELETE SPIKES
Activate the Input objects selection by clicking the Active button to toggle between
and . Select the objects you want to examine in the Graphics window.
They appear in the Input objects list. Note that this defeaturing tool cannot find spikes
on faces that belong to nonmanifold objects. An example of a nonmanifold object is

REPAIRING AND DEFEATURING | 65


an object with several domains. Such an object can for example result from a Union or
a Partition operation. To avoid this situation defeature the geometry objects before
applying Boolean operations that result in nonmanifold objects.

The Delete Spikes tool can only be applied to objects that are represented
by the Parasolid® geometry kernel, also called CAD objects.

In the field Maximum spike width, enter the maximum width of the spikes you want to
delete. When you click the Find Spikes button, a list of spikes with width smaller that
the given value are shown in the Spike selection list.

To delete the found details, either click the Delete All button, or select a subset of the
found details in the list and click Delete Selected. Then, the selected details are deleted
from their objects, and a node corresponding to this operation is added to the
geometry branch of the model tree.

If you want to modify the performed deletion operation, you can select the added node
in the geometry branch. Then, edit the node’s form that appears in the Settings
window. Click the Build Selected button ( ) to see the result of your edits. The
Settings window for Delete Spikes contains the additional settings described below.

To delete all spikes returned by the search set the Deletion type to All spikes. You can
delete a subset of the found spikes by selecting them in the Spike selection list, and
choosing Selected spikes in the Deletion type list.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These

66 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

Detach Faces
By detaching, faces are removed from an object (the parent) and are used to form a
new object (the child). The wound that results from detaching the faces is healed by
either creating new faces based on the surrounding edges or by growing or shrinking
adjacent faces.

To open the Tools window for Detach Faces, from the Geometry toolbar, Defeaturing and
Repair ( ) menu, select Detach Faces ( ). You can also right-click the Geometry
node and select the same option from the context menu.

Note: When you are in the Tools window for Detach Faces, you can at any time switch
to another defeaturing tool by clicking one of the corresponding buttons at the top of
the window.

Select the faces you want to detach in the Graphics window. They appear in the Faces
to detach list.

The Detach Faces tool can only be applied to objects that are represented
by the Parasolid® geometry kernel, also called CAD objects.

The Parent heal method list determines how to replace the detached faces in the parent
object: Create capping faces means that a new faces are constructed based on the edges
adjacent to each wound, and Extend adjacent faces (default) means that the wound is
covered by growing and shrinking the adjacent faces.

The Child heal method list controls how to construct the child solid from the detached
faces: Create capping faces means that a new face is formed based on the surrounding
edges of each wound, Extend adjacent faces from child means that the detached faces
grow or shrink to form a solid, and Extend adjacent faces from parent (default) means
that the parent faces surrounding the detached faces grow or shrink to form a solid
together with the detached faces.

When you click the Detach Selected button, the program detaches the selected faces and
adds a node corresponding to this operation to the geometry branch of the model tree.

REPAIRING AND DEFEATURING | 67


The Tools window for Detach Faces remains open so that you can continue
defeaturing using this or another defeaturing tool.

If you want to modify the performed detach operation, select the added node in the
geometry branch. Then edit the node’s form that appears in the Settings window. Click
the Build Selected button ( ) to see the result of your edits. The Settings window for
Detach Faces contains the additional settings described below.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

Detect Interferences
To analyze the interference of geometry objects, from the Geometry toolbar,
Defeaturing and Repair ( ) menu, select Detect Interferences ( ). You can also
right-click the Geometry node and select the same option from the context menu.

Note: When you are in the Tools window for Detect Interferences, you can at any time
switch to another defeaturing tool by clicking one of the corresponding buttons at
the top of the window.

In the Input objects list, select the objects you want to analyze. In the Tolerance text
field, enter the absolute tolerance, which has the default value of 0.1 mm, to be used

68 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


for the search. When you click the Find Interferences button, a list of interferences is
displayed in the Interfering faces list.

The interference detection applies to the exterior faces of the selected objects, thus
ignoring interior faces, isolated edges and vertices. Each detected interference involves
two objects. The following types of interferences appear in the list when detected by
the tool:

• Touch. Two interfering objects are classified as touching when they intersect, and
the interfering faces are located within a distance less than the specified tolerance
from each other. Thus, an intersection (as defined below) may become a touch after
you increase the tolerance such that it becomes larger than the distance between the
interfering faces.
• Intersection. An intersection between the two objects is detected, and the
interfering faces are located at a distance that is larger than the tolerance from each
other.
• Gap. No intersection is detected between the two objects, but they have faces with
portions that are located within a distance less than the specified tolerance from each
other. The detected size of the gap appears in the list.
• Containment. One object is a contained in another object, which is a solid.

By default the Interfering faces list displays the detected interferences in a tree with the
interferences as the top level nodes sorted by the type of interference. To sort the list
by the objects select the Group by object check box. In this case the objects involved in
an interference are listed as the top level nodes in the tree. Expand a top level node to
see the list of objects that the object on the top level is interfering with. Expand a
subnode to see the list of detected interferences for the objects. You can expand the
nodes for the detected interferences to reveal the two interfering objects, and then
expand the nodes for the objects to look at the interfering faces displayed in subnodes
according to the following:

• For two intersecting solid objects the nodes for the objects have two subnodes each,
Inside and Outside. Click the Inside node to highlight the parts of the interfering
faces that are inside the other object. Click the Outside node to highlight the parts
of the interfering faces that are outside the other object.
• For two intersecting surface objects the nodes for the objects have two subnodes
each, Small side and Large side. The faces resulting from the intersection are
grouped according to size since surface objects do not delimit a volume in space,
thus it is not possible to determine what is inside or outside the other object. Click

REPAIRING AND DEFEATURING | 69


the Small side and Large side nodes to highlight the parts of the interfering faces
that result from the intersection with the faces of the other object.
• For an intersection of a solid and a surface object, the node for the solid object has
the subnodes Small side and Large side, while the node for the surface object has
subnodes Inside and Outside.
• For two touching objects, the nodes for the objects may have two subnodes,
Touching and Not touching. Click these nodes to highlight the corresponding
portions of the interfering faces.
• For a gap between two objects, the nodes for the objects may sometimes have two
subnodes Touching and Not touching.
• For a Containment node, the first subnode is the containing object, and the second
subnode is the contained object.

VISUALIZATION OF DETECTED INTERFERENCES


For a better visualization of the detected interferences, the Detect Interferences tool
partitions the faces involved in the intersections and touches so that the interfering face
regions can be shown and highlighted separately. In the Interfering faces list, when you
select the nodes for the interferences, or the topmost or first sublevel object nodes
when the Group by object check box is selected, the interferences are visualized only by
highlighting those faces or face regions that enclose an intersection or are directly in
touch. In the list, these are the faces belonging to the first subnode of each object node
under the selected interference node. Thus, when you click a node for an interference
in the list, the faces or face regions belonging to nodes Outside, Large side, and Not
touching are not highlighted. Expand the node for the interference, and select the
object subnodes, to see highlighted the involved faces in their entirety, including the
face regions that are not directly interfering.

Note that the face partitioning that is the result of the intersections is visible only while
working with the Detect Interferences tool, and that the geometry is not modified by
this tool.

To change which objects are shown in the Graphics window while selecting nodes in
the Interfering faces list choose one of the options from the Show in graphics list:

• Choose Interfering faces only to show only the interfering faces involved in the
selected node. For example, if you select an intersection node from the list, only the
face regions from the two objects that are involved in the intersection are shown.
• Choose Selected object (default) to show only the objects involved in the selected
node.

70 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


• Choose Other object to show the object that is interfering with the currently selected
object subnode to the interference node.
• Choose Both objects to show both objects involved in an interference when you
select one of the subnodes to the interference node.
• Choose All objects to show all objects regardless of which nodes are selected.

The Zoom to Selection button next to the Interfering faces list may also help to find the
detected interferences on the geometry. For a better view of the interferences between
objects you can also click the Wireframe Rendering or Transparency buttons in the
Graphics toolbar.

Repair
To repair objects, from the Geometry toolbar, Defeaturing and Repair ( ) menu, select
Repair ( ). You can also right-click the Geometry node and select the same option
from the context menu.

REPAIR
Select the objects to repair in the Graphics window. They appear in the Input objects list.

The software tries to repair defects and remove details smaller than the Absolute repair
tolerance. More precisely:

• Entities with invalid sense


• Invalid edge and vertex tolerances
• Invalid manifolds
• Self-intersecting manifolds
• Non-G1 manifolds
• Missing edge or vertex manifolds
• Missing vertex
• Vertices not on curve of edge
• Edges and vertices not on surface of face
• Removal of surface self-intersections that lie outside the face
• Splitting at edge intersections which have no vertex
• Removal of discontinuities by either splitting or smoothing
• Remove small features (short edges, small faces, sliver faces, and spikes)

REPAIRING AND DEFEATURING | 71


Select the option Simplify curves and surfaces to also simplify within the Absolute repair
tolerance the underlying curve and surface manifolds of the geometric entities.
Repairing objects with this option may improve both the performance and reliability
of geometric operations on some imported geometry, for example it may help in some
cases when Boolean operations on the imported objects fail. Simplification means that
the manifolds are converted where possible to analytical form: linear, circular, and
elliptical curves; and planar, spherical, cylindrical, conical, and toroidal surfaces.
Manifolds that are converted are B-spline curves and surfaces, or certain surfaces
generated by operations such as sweeping, revolving, and filleting.

Select the Repair face-to-face inconsistencies in solids check box to try to repair solid
objects with this fault reported by Import, Check, or Repair features.

When the option Check resulting objects is selected the repaired objects are checked for
remaining problems. Warning nodes appear with details about the detected problems,
if any. Use the Zoom to Selection button next to the Entities list in a warning node to
locate the problematic edges or faces. For information on geometry problems see the
Check feature.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means

72 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Replace Faces
By replacing faces from an object you can delete the geometric features formed by the
faces. The deleted faces are replaced either by new faces created based on the edges
surrounding the wound or by growing or shrinking of adjacent faces.

To open the Tools window for Replace Faces, from the Geometry toolbar, Defeaturing
and Repair ( ) menu, select Replace Faces ( ). You can also right-click the Geometry
node and select the same option from the context menu.

Note: When you are in the Tools window for Replace Faces, you can at any time switch
to another defeaturing tool by clicking one of the corresponding buttons at the top of
the window.

Select the faces you want to replace in the Graphics window. They appear in the Faces
to replace list.

The Replace Faces tool can only be applied to objects that are represented
by the Parasolid® geometry kernel, also called CAD objects.

In the Heal method list, select the method to use for covering the wounds after deleting
the faces to be replaced: Create capping faces means that new faces are generated based
on the edges surrounding each wound, while Extend adjacent faces means that the
adjacent faces are grown or shrunk to heal the wounds. Select the Heal as through hole
check box if you have selected faces that make up a hole that you want to delete and
replace.

When you click the Replace Selected button, the program deletes and replaces the
selected faces and adds a node corresponding to this operation to the geometry branch
of the model tree. The Tools window for Replace Faces remains open so that you can
continue defeaturing using this or another defeaturing tool.

REPAIRING AND DEFEATURING | 73


If you want to modify the performed replace operation, select the added node in the
geometry branch. Then edit the node’s form that appears in the Settings window. Click
the Build Selected button ( ) to see the result of your edits. The Settings window for
Replace Faces contains the additional settings described below.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

74 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


Creating and Modifying Geometries
This section describes the operations for creating and modifying geometries listed in
the table below.
TABLE 2-6: OPERATIONS FOR CREATING AND MODIFYING.

ICON NAME DESCRIPTION

Cap Faces Generate faces from edges to fill gaps and create solid objects, or
to partition solids
Chamfer Create a bevel on selected edges

Fillet Create rounds on selected edges

Knit to Solid Knit surface objects to form solid or surface object

Loft Create a lofted surface from a set of profile curves

Midsurface Generate midsurfaces for selected solid objects

Offset Faces Offset faces of 3D objects in the normal direction

Projection Project 3D objects and entities to a work plane

Thicken Create a solid by offsetting selected surfaces

Transform Displace, rotate, and scale faces of 3D objects


Faces

Cap Faces
You can add cap faces to fill holes in a geometry (for example, to make a domain for
the void inside a cylinder geometry for simulating fluid flow inside the cylinder) or to
partition the geometry. To add cap faces to objects, from the Geometry toolbar,
Defeaturing and Repair ( ) menu, select Cap Faces ( ).

CAP FACES
Select edges that form loops around the faces you want to create. The edges display in
the Bounding edges list. To automatically extend the selection to all adjacent edges that
form a loop or chain, select the Group adjacent edges check box.

CREATING AND MODIFYING GEOMETRIES | 75


A cap face is created for each loop of edges in the input selection. The cap faces are
joined with the original objects. If new closed volumes are created by the cap faces,
these are converted to solid domains. The selected edges can contain more than one
edge loop, but no two loops can have edges or vertices in common. The selected edges
can contain edges from more than one object. In this case, each object is processed
individually. This means that two edges or vertices can overlap as long as they are not
in the same object. It also means that if new closed volumes are created, but bounded
by faces from more than one object, these volumes are not converted to solid domains.
If you want to perform a Cap Faces operation involving more than one object, first
unite the objects using a Union operation.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

76 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


Chamfer
To chamfer corners in 3D geometry objects, from the Geometry toolbar, Editing ( )
menu, select Chamfer ( ). You can also right-click the Geometry node to add this
node from the context menu.

EDGES
Select the edges that you want to chamfer in the Graphics window. They then appear
in the Edges to chamfer list. If the geometry sequence includes user-defined selections
above the Chamfer node, choose Manual to select edges, or choose one of the selection
nodes from the list next to Edges to chamfer.

Click the Active button to toggle between turning ON and OFF the Edges to chamfer
selections.

RADIUS
Enter the Radius of the chamfer. The size of the chamfer is determined by rolling a ball
of the given radius so that it is tangent to the faces that are adjacent to the edge. The
chamfer surface is generated by the line segment that connects the points of tangency.

OPTIONS
Select or clear the following check boxes as needed.

• If the Propagate to tangent edges check box is selected, the chamfer is propagated to
edges that have continuous tangent to the edges selected in Edges to chamfer.
• If the Preserve overlapped entities check box is selected, geometric features such as
holes and bosses on faces that are overlapped by the chamfer surface are preserved.
• Select the Y-shaped chamfer check box to get a y-shaped chamfer at a vertex where
three or more edges meet and there are two chamfer surfaces of different convexity.
In some cases, using this option is necessary for the operation to succeed.

CREATING AND MODIFYING GEOMETRIES | 77


SELECTIONS OF RESULTING ENTITIES
If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Fillet
To fillet corners in 3D geometry objects, from the Geometry toolbar, Editing ( )
menu, select Fillet ( ). You can also right-click the Geometry node and add this node
from the context menu.

The objects containing the selected edges must have manifold topology in the
neighborhood of the selected edges. In particular, each edge must be adjacent to
exactly two faces. When you build the feature, these adjacent faces are shrunk and a
rolling ball fillet face is inserted in between. The new surface is generated by rolling a

78 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


ball of the given radius so that it is tangent to both faces. The fillet face is therefore
tangent to both original faces.

When more than two selected edges meet at a vertex, one or several additional patch
faces are inserted at the vertex to get a smooth result.

If the radius is large, it can happen that the fillet face overflows the original faces. In
this case the fillet face meets other, more distant, faces in the object.

EDGES
Select the edges that you want to fillet in the Graphics window. They then appear in the
Edges to fillet list. If the geometry sequence includes user-defined selections above the
Fillet node, choose Manual to select edges, or choose one of the selection nodes from
the list next to Edges to fillet.

Click the Active button to toggle between turning ON and OFF the Edges to fillet
selections.

RADIUS
Enter the Radius of the fillet. The fillet surface is generated by rolling a ball of the given
radius so that it is tangent to the faces adjacent to the edge.

CREATING AND MODIFYING GEOMETRIES | 79


OPTIONS
Select or clear the following check boxes as needed.

• If the Propagate to tangent edges check box is selected, the fillet is propagated to
edges that have continuous tangent to the edges selected in Edges to fillet.
• If the Preserve overlapped entities check box is selected, geometric features such as
holes and bosses on faces that are overlapped by the fillet surface are preserved.
• Select the Y-shaped fillet check box to get a y-shaped fillet at a vertex where three or
more edges meet and there are two fillet surfaces of different convexity. In some
cases, using this option is necessary for the operation to succeed.

Y-shaped fillet selected

Y-shaped fillet cleared

• Select the Fillet sharp edges at vertices check box to get a smooth fillet surface at
vertices where two filleted edges intersect at an angle.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials

80 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Knit to Solid
To knit surface objects to form solid objects, from the Geometry toolbar, Defeaturing
and Repair ( ) menu, select Knit to Solid ( ).

KNIT TO SOLID
Select the objects to knit together in the Graphics window. They appear in the Input
objects list.

The knitting merges edges that have a distance smaller than the Absolute repair
tolerance and deletes gaps and spikes smaller than the Absolute repair tolerance. If the
Fill holes check box is selected the operation attempts to generate new faces to replace
missing geometry.

The input surface objects must have manifold topology, and the operation can only
form solids with manifold topology. An example of a solid object with nonmanifold
topology is a solid that has an interior surface that separates two domains. A surface
object that contains an edge that is adjacent to more than one boundary is an example
of a surface object with nonmanifold topology.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

CREATING AND MODIFYING GEOMETRIES | 81


Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Loft
To create a lofted object from a set of profiles in 3D, in the Geometry toolbar, click Loft
( ). You can also right-click the Geometry node and add this node from the context
menu. Enter the properties of the loft operation according to the following sections.

Start profile Profiles End profile

Guide curves Lofted object

Each profile is a chain or loop of edges, also called a profile curve. The profiles must
be all open or all closed, and they must have the same number of edges. The output is
a loft surface, which consists of one or several faces that interpolate the profiles. In the

82 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


closed curve case, a profile can optionally contain a set of faces (with manifold
topology) that is bounded by the profile curve. These faces can be added to the loft
surface to give the resulting object. The start and end profiles can degenerate to a
point. Also, in the closed profile case, the start and end profiles can degenerate to an
open curve. The loft can be periodic, which means that the end profile should not be
specified because it equals the start profile (in this case the degenerate profiles are not
allowed).

There can also be curves in the lofting direction that the loft surface should interpolate;
these are called guide curves. If there are no guide curves, there must be at least two
profiles.

GENERAL
Select or clear the following check boxes as needed.

• Select the Periodic loft check box to create a periodic loft, for which the start and
end profiles coincide.
• If the Unite with input objects check box is selected, the resulting object is the union
of the loft surface with the objects containing the start and end profiles and the
objects containing the start and end guide curves. The faces that might exist in the
start and end profiles are always included in the resulting object.
• Select Remove redundant profile vertices to remove vertices that separate edges with
identical curves before generating the loft. This option is useful when the outputs
of Interpolation Curve features is used as profiles for the loft.
• If the Keep intermediate profile faces check box is selected, faces in the intermediate
profile objects are added to the resulting object. Any faces belonging to the start and
end profiles are always kept.
• Select an Object type — Solid (the default) or Surface. This determines whether
domains should be created in the resulting object.
• Select a Face partitioning:
- If Minimal (the default) is selected, the loft surface is divided along the loft
direction only at vertices where the profile curve has a tangent discontinuity.
- If Columns is selected, the loft surface is divided along the loft direction at each
vertex of the profile curves.
- If Grid is selected, in addition to the Columns partitioning, the loft surface is
divided by the profile curves. The loft surface is always partitioned by the profile
faces when Keep intermediate profile faces is selected.

CREATING AND MODIFYING GEOMETRIES | 83


PROFILES
This section specifies the profiles that are not specified in the Start Profile or End Profile
sections.

Select the objects that you want to use as profiles in the Graphics window. You can
select a set of connected surface objects, curve objects, or point objects. Surface objects
must have manifold topology and be bounded by a single edge loop. Curve objects
must be a single edge loop or chain. Point objects are only allowed for use as start or
end profiles and must have a single vertex. The selected objects appear in the Profile
objects list. If the geometry sequence includes user-defined selections above the Loft
node, choose Manual to select objects, or choose one of the selection nodes from the
list next to Profile objects.

Click the Active button to toggle between turning ON and OFF the Profile objects
selection.

START PROFILE
Use this section to specify the start profile in the following cases:

• If you want to explicitly specify which profile should be the start profile.
• If the start profile is part of a larger object.
• If you want to prescribe the direction of the loft surface on the start profile.

In other cases, you can specify the start profile in the Profiles section, and leave the
selection in the Start Profile section empty.

Select a Geometric entity level for the profile — Object, Point, Edge, or Boundary. Click
to select the entities in the Graphics window. An object selection must fulfill the
requirements detailed in the Profiles section. A point selection must consist of a single
point. An edge selection must form a single edge loop or chain. A boundary selection
must have manifold topology and be bounded by a single edge loop. The selected
entities appear in the Start profile list. If the geometry sequence includes user-defined
selections above the Loft node, choose Manual to select objects or entities, or choose
one of the selection nodes from the list next to Input objects.

Click the Active button to toggle between turning ON and OFF the Start profile
selection.

Select a Loft direction — Not prescribed (the default), Parallel, Perpendicular, or At angle.
For Parallel the loft direction is prescribed along the profile curve, while for
Perpendicular or At angle it is only prescribed at the vertices on the profile curve.

84 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


Select Relative to — Adjacent faces (the default), Profile faces, or Profile edges’ plane.
When At angle is selected, also enter an Angle (SI unit: deg).

• Adjacent faces are the faces that are adjacent to the profile edges and that are not
contained in the Start profile selection.
• Profile faces are the faces contained in the Start profile selection.
• Profile edges’ plane means that the loft direction is prescribed in relation to the
plane tangent to the profile’s edges at each vertex on the profile curve.

END PROFILE
The settings for this section are analogous to the Start Profile section. This section
should not be used if the loft is periodic.

GUIDE CURVES
Use this section if you want to specify guide curves for the lofted object.

Select the objects that you want to use as guides in the Graphics window. You can select
a set of curve objects. In the nonperiodic case, each guide object must be a single edge
chain. In the periodic case, each guide object must be a single edge loop. Each guide
object must have continuous tangents and intersect each profile exactly once. The
objects appear in the Guide objects list. If the geometry sequence includes user-defined
selections above the Loft node, choose Manual to select objects, or choose one of the
selection nodes from the list next to Guide objects.

Click the Active button to toggle between turning ON and OFF the Guide objects
selection.

START GUIDE CURVES


Use this section to specify the start guide curve in the following cases:

• If the start guide curve is part of a larger object.


• If you want to prescribe the direction of the loft surface on the start guide curve.

In other cases, you can specify the start guide curve in the Guide Curves section, and
leave the selection in the Start Guide Curve section empty.

The selected set of edges must form a single edge loop or chain, and fulfill the other
requirements on a guide curve. Click the Active button to toggle between turning ON
and OFF the Edges selection.

CREATING AND MODIFYING GEOMETRIES | 85


Select a Loft surface direction — Not prescribed (the default) or Parallel to adjacent faces,
which means that the loft surface is prescribed to be tangent to the adjacent faces along
the guide curve.

END GUIDE CURVES


The settings for this section are analogous to the Start Guide Curve. This section
should not be used in the closed profile case.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

SELECTIONS ON INPUT OBJECTS


If you have Named Selections that include entities on the input objects, select the
Propagate selections to resulting objects (selected by default) check box to update the
selections to corresponding entities on the output objects, when possible. Clear the
check box to not propagate the selection to the resulting objects. Selecting this option
can be useful in combination with clearing the Unite with input objects check box so
that the selections refer only to the input objects.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.

86 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Midsurface
The Midsurface feature is the inverse of the Thicken feature (with symmetric offset).
It removes the thickness of a solid object (having constant thickness), resulting in a
surface object, which can be useful if you can use a Shell interface, for example, and
model the physics on surfaces only.

In the Geometry toolbar, Conversions menu, click Midsurface ( ). You can also
right-click the Geometry node and add this node from the Conversions submenu.

INPUT
Select the objects that you want to use as input in the Graphics window. The objects
appear in the Input objects list. A midsurface object is generated for each input object
independently. If the geometry sequence includes user-defined selections above the
Midsurface node, choose Manual to select objects, or choose one of the selection nodes
from the list next to Input objects.

Click the Active button to toggle between turning ON and OFF the Input objects
selection.

Select the Keep input objects check box to use the selected geometry objects for further
geometry operations.

CREATING AND MODIFYING GEOMETRIES | 87


OPTIONS
Select the Repair overlaps check box to repair areas where two or more generated
midsurfaces overlap.

Repair overlaps selected

Repair overlaps cleared

Click to select the Split in smooth components check box as needed. If this is selected,
each output object is split into components, where each component is of manifold type
and has smooth normal vector.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

88 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Offset Faces
To offset the faces of 3D geometry objects in the normal direction, from the Geometry
toolbar, Editing ( ) menu, select Offset Faces( ). You can also right-click the
Geometry node and add this node from the context menu.
Faces to offset

Enter the properties of the Offset Faces operation using the following sections:

FACES
Select the faces that you want to offset in the Graphics window. They then appear in
the Faces to offset list. If the geometry sequence includes user-defined selections above
the Offset Faces node, choose Manual to select faces, or choose one of the selection
nodes from the list next to Faces to offset.

Click the Active button to toggle between turning ON and OFF the Faces to offset
selections.

Select the Keep input objects check box if you want to use the selected geometry objects
for further geometry operations.

When the Subtract input objects check box is selected, after the faces are offset, the
corresponding input objects are subtracted from the offset objects.

CREATING AND MODIFYING GEOMETRIES | 89


OFFSET
Enter a Distance for the offset. Switching between a positive and negative number
reverses the offset direction.

Select the Reverse side check box (cleared by default) to reverse the offset direction.
This is equivalent to changing the sign of the offset distance.

OPTIONS
Select the check box Fillet convex edges, cleared by default, to fillet convex edges
between two offset faces. By default, such offset faces are instead extended until they
meet.

The check box Perpendicular step edges for surface objects, cleared by default, applies
to offsetting faces of a surface object, when the operation sometimes needs to split a
vertex in two and introduce a step edge in between them. By default, the step edge is
not perpendicular to an adjacent edge. With the check box selected, the created step
edge is perpendicular to an adjacent edge.

90 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


To decide how step faces that connect the bounding edges of the offset faces with the
adjacent faces are created, select one of the available options for Create step faces:

• Select Where faces meet with continuous tangent (default) to create step faces at all
bounding edges where the selected faces meet the adjacent faces with tangent
continuity.
• Select No to not create step faces.

Face to offset

Create step faces: Where faces meet with


continuous tangent

Create step faces: Where faces meet with Create step faces: No
continuous tangent
Except if faces at ends of edge can be merged

When Create step faces is set to Where faces meet with continuous tangent you can select
the check box Except if faces at ends of edge can be merged (cleared by default) to
extend and merge, if possible, the neighboring faces at the two ends of those bounding
edges where faces meet with continuous tangent.

Use the Overflow handling setting to determine how to handle the case when an offset
face moves beyond a nearby face in such a way that a wound (hole) appears. The
following options are available:

• Automatic (default). The operation determines a suitable method to cover the


wound caused by the overflow.
• Extend offset faces. With this option the offset faces are extended to cover the wound
caused by the overflow.

CREATING AND MODIFYING GEOMETRIES | 91


• Extend other faces. With this option the faces that are not offset are extended to
cover the wound caused by the overflow.
• Cap faces. The wound caused by the overflow is covered by creating new faces based
on the edges surrounding the wound.
• Disallow. This option will return an error message if overflow happens.

Face to offset

Overflow handling: Extend offset faces

Overflow handling: Extend other faces Overflow handling: Cap faces

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain

92 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

SELECTIONS ON INPUT OBJECTS


If you have Named Selections that include entities on the input objects, select the
Propagate selections to resulting objects (selected by default) check box to update the
selections to corresponding entities on the output objects, when possible. Clear the
check box to not propagate the selection to the resulting objects. Selecting this option
can be useful in combination with selecting the Keep input objects check box so that
the selections refer only to the input objects.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Projection
Use the Projection feature to compute the projection of 3D objects and entities to a
work plane. This can be useful when you need to reference existing 3D objects in the
2D drawing on the work plane. You can also add a new 2D or 2D axisymmetric
component and add the Projection node there. In that case you can select the work
plane to use for the projection from the 3D component’s geometry sequence, but first
make sure that in the 3D component’s Geometry node the Geometry representation is
set to the CAD kernel.

To add a projection to a Work Plane node’s Plane Geometry sequence, from the Plane
Geometry toolbar select Projection ( ), or right-click a Plane Geometry node under a
Work Plane node and select Projection ( ). Enter the properties of the projection
using the following sections:

PROJECTION
From the Project list, choose All objects (the default) to project all 3D geometry objects
to the work plane, or choose Selected objects, Selected domains, Selected boundaries,

CREATING AND MODIFYING GEOMETRIES | 93


Selected edges, or Selected vertices to project only the objects or entities that you add
to the Entities to project list that appears.

Click the Active button to toggle between turning ON and OFF the Entities to project
selections.

When projecting objects, domains, and boundaries you can select the Projection type
to project the Outline (default) of the selected objects and entities, or to project the
Edges and vertices only, or the Outline, edges, and vertices.

Projecting the outline for surface and solid objects results in the edges that form the
boundary of the shadow of the object’s faces. In this case the edges are projected only
if they coincide with the outline. If you project the outline of a mixed object that
contains isolated edges and vertices, only the outline of the faces is generated, the
isolated edges and vertices are not projected.

For point and curve objects, projecting the outline is the same as projecting the edges
and vertices.

You can change the settings for the Repair tolerance list if you experience problems with
the projection operation. Geometric entities that have a distance less than the repair
tolerance are merged.

• The default value in the Repair tolerance list is Automatic, which means a relative
repair tolerance of 10-6.
• Choose Relative to enter a value for the Relative repair tolerance field (the default is
determined by the main Geometry node’s setting). This value is relative to the largest
absolute value of the coordinates of all input objects.
• Choose Absolute to enter a value for the Absolute repair tolerance field (the default
is determined by the main Geometry node’s setting; SI unit: m). This value uses the
same unit as the geometry sequence’s length unit.

When you build this feature, the relative and absolute repair tolerances are set to the
values that are used for the last projected object (with a precision of two digits). This
is useful to find out the tolerance used for the last projected object. After the feature
is built, you can set the Repair tolerance to either Relative or Absolute, then check the
values displayed in the Relative repair tolerance or Absolute repair tolerance fields.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no

94 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, boundaries, and points — that are applicable) in subsequent nodes in
the plane geometry sequence. To also make all or one of the types of resulting entities
(objects, boundaries, and points) available as selections in applicable selection lists in
the main Geometry node’s geometry sequence, choose an option from the Show in 3D
list: All levels, Object selection (default), Boundary selection, or Point selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the plane geometry sequence.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Thicken
In the Geometry toolbar, Conversions menu, click Thicken ( ) to convert a surface
object to a solid object by giving it a thickness in the normal direction. You can also
right-click the Geometry node and add this node from the Conversions submenu.

INPUT
Select the objects that you want to thicken in the Graphics window. The objects appear
in the Input objects list. Each input object is thickened independently. If the geometry
sequence includes user-defined selections above the Thicken node, choose Manual to
select objects, or choose one of the selection nodes from the list next to Input objects.

Click the Active button to toggle between turning ON and OFF the Input objects
selections.

Select the Keep input objects check box to use the selected geometry objects for further
geometry operations.

OPTIONS
Select an Offset — Symmetric (the default) or Asymmetric.

CREATING AND MODIFYING GEOMETRIES | 95


If Symmetric is selected enter a Total thickness.

If Asymmetric is selected enter an Upside thickness and a Downside thickness.

Select the Fillet offset edges check box to fillet each convex edge joining two offset
faces, using the offset distance as the fillet radius. This option applies only when the
offset is single sided; that is, when either the up or down thickness is set to 0.

For either choice, select the Direction of side faces — Normal (the default) or Vector. For
Vector, and based on space dimension, enter values or expressions for x, y, and z (SI
unit: m). Note that this setting influences only the direction of the side faces, the
specified thickness is always applied in the normal direction.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

SELECTIONS ON INPUT OBJECTS


If you have Named Selections that include entities on the input objects, select the
Propagate selections to resulting objects (selected by default) check box to update the
selections to corresponding entities on the output objects, when possible. Clear the
check box to not propagate the selection to the resulting objects. Selecting this option
can be useful in combination with selecting the Keep input objects check box so that
the selections refer only to the input objects.

96 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

Transform Faces
Using the Transform Faces operation you can apply a linear transform (consisting of
displacement, rotation, and isotropic scaling) on a selection of faces on 3D geometry
objects. The transformed faces and their adjacent faces are extended or trimmed to
cover any wounds that may result. Alternatively, the wounds are filled by inserting step
faces.

Direction for
displacement
Faces to transform

To add a Transform Faces node to a geometry sequence, from the Geometry toolbar,
Editing ( ) menu, select Transform Faces( ). You can also right-click the Geometry
node and add this node from the context menu.

Enter the properties of the Transform Faces operation using the following sections:

FACES
Select the faces that you want to transform in the Graphics window. They then appear
in the Faces to transform list. If the geometry sequence includes user-defined selections
above the Transform Faces node, choose Manual to select faces, or choose one of the
selection nodes from the list next to Faces to transform.

Click the Active button to toggle between turning ON and OFF the Faces to offset
selections.

CREATING AND MODIFYING GEOMETRIES | 97


Select the Keep input objects check box if you want to use the selected geometry objects
for further geometry operations.

COORDINATE SYSTEM
The coordinate system in which the point coordinates, displacements, and axis of
rotation are interpreted for the linear transformation. From the Work plane list, select
xy-plane (the default, for a standard global Cartesian coordinate system) or select any
work plane defined above this node in the geometry sequence. If you choose a work
plane, the work plane and its coordinate system appears in the Graphics window, using
an extra coordinate triad with the directions xw, yw, and zw (which are then used to
specify the coordinates, displacements, and the rotation axis position).

CENTER
Specify a point on the axis of rotation, and the centerpoint of the scaling by specifying
x, y, and z; xw, yw, and zw if a work plane is selected as the coordinate system. This is
the point that stays fixed during the scaling (that is, the point that the scaled faces
approach when the scale factor goes to zero).

ROTATION
From the Specify list, choose Axis of rotation (the default), Euler angles (Z-X-Z), or Edge
as the way to specify the rotation.

• For Axis of rotation, select an Axis type: x-axis, y-axis, z-axis (the default), Cartesian,
or Spherical. For any choice, enter an Angle (SI unit: degrees; default 0) to specify
the rotation. If Cartesian is selected, enter Cartesian coordinates values for x, y, and
z (default values 0, 0, and 1, respectively, corresponding to the global z-axis) to
specify the axis vector. If Spherical is selected, specify the axis vector using spherical
angles theta and phi in degrees (default: 90 and 0, respectively).
• For Euler angles (Z-X-Z), enter values for the intrinsic Z-X-Z Euler angles α, β, and
γ in the corresponding text fields (in degrees; the default values are 0).
• For Edge, choose a straight edge as the axis of rotation and add it to the Straight edge
list. Then enter an Angle (SI unit: degrees; default 0) to specify the rotation angle.

SCALING
Specify the isotropic scaling factor in the Factor field.

DISPLACEMENT
Enter values or expressions to specify the x, y, and z displacements (SI unit: m).

98 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


OPTIONS
To decide how the step faces, which connect the bounding edges of the transformed
faces with the adjacent faces, are created, select one of the available options for Create
step faces:

• Select Yes to create step faces for all bounding edges of the transformed faces.
• Select Where faces meet with continuous tangent (default) to create step faces at all
bounding edges where the selected faces meet the adjacent faces with tangent
continuity.
• Select No to not create step faces.

When Create step faces is set to Yes you can select the check box Merge step faces with
adjacent face, cleared by default, to extend and merge, if possible, the neighboring faces
with the step faces.

When Create step faces is set to Where faces meet with continuous tangent you can select
the check box Except if faces at ends of edge can be merged, cleared by default, to extend
and merge, if possible, the neighboring faces at the two ends of those bounding edges
where faces meet with continuous tangent.

Use the Overflow handling setting to determine how to handle the case when a
transformed face moves beyond a nearby face in such a way that a wound (hole)
appears. The following options are available:

• Automatic (default). The operation determines how to cover the wound caused by
the overflow.
• Extend transformed faces. With this option the transformed faces are extended to
cover the wound caused by the overflow.
• Extend other faces. With this option the faces that are not transformed are extended
to cover the wound caused by the overflow.
• Cap faces. The wound caused by the overflow is covered by creating new faces based
on the edges surrounding the wound.
• Disallow. This option will return an error message if overflow happens.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

CREATING AND MODIFYING GEOMETRIES | 99


Select the Resulting objects selection check box to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

SELECTIONS ON INPUT OBJECTS


If you have Named Selections that include entities on the input objects, select the
Propagate selections to resulting objects (selected by default) check box to update the
selections to corresponding entities on the output objects, when possible. Clear the
check box to not propagate the selection to the resulting objects. Selecting this option
can be useful in combination with selecting the Keep input objects check box so that
the selections refer only to the input objects.

ASSIGNED ATTRIBUTES
From the Construction geometry list choose On to make the resulting objects available
only in the feature’s geometry sequence. The default option Inherit from input means
that the resulting objects become construction geometry if all input objects are
construction geometry. Choose Off to never output construction geometry objects.
For more information see Construction Geometry in the COMSOL Multiphysics
Reference Manual.

100 | CHAPTER 2: GEOMETRY TOOLS AND FEATURES


3

Programming and Command Reference

In this section you find detailed COMSOL® API reference information for the
geometry features in the Design Module.

101
De f e a tur i ng Tool s
To remove unnecessary details in objects imported from a 3D CAD file, and detect
interferences between objects, you can use the defeaturing tools. You access these by
typing:

[Link](<ctag>).geom(<tag>).defeaturing("Fillets");
[Link](<ctag>).geom(<tag>).defeaturing("Holes");
[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges");
[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces");
[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces");
[Link](<ctag>).geom(<tag>).defeaturing("Spikes");
[Link](<ctag>).geom(<tag>).defeaturing("ReplaceFaces");
[Link](<ctag>).geom(<tag>).defeaturing("DetachFaces");
[Link](<ctag>).geom(<tag>).
defeaturing("DetectInterferences");

Using the defeaturing tools you can search for small details, without altering your
geometry. If you find small details that you want to remove, a defeaturing tool can
create a feature that removes the details from the geometry.

The features corresponding to the defeaturing tools are DeleteFillets,


DeleteHoles, DeleteShortEdges, DeleteSliverFaces, DeleteSmallFaces,
DeleteSpikes, ReplaceFaces, and DetachFaces. If you already know which details
you need to remove, it is also possible to create these features directly using the
standard create syntax.

This section includes these topics:

• Defeaturing Tools — Finding and Deleting Small Details


• Defeaturing Tools — Detach Faces
• Defeaturing Tools — Detect Interferences
• Defeaturing Tools — Replace Faces

Defeaturing Tools — Finding and Deleting Small Details


The defeaturing tools Fillets, Holes, ShortEdges, SliverFaces, SmallFaces,
and Spikes search for and delete details smaller than a given size. First select the
objects you want to examine by typing, for example,

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
selection("input").set(<onames>);

102 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


where <onames> is a string array contains the object names.

Set the maximum size of the details (fillets in this case) you want to remove by typing

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
set("entsize",size);

The defeaturing tools Fillets and Holes also support specifying a minimum radius,
to do this type (for fillets in this case):

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
set("minentsize",minsize);

To find the details in the specified size interval, type

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
find();

The found details appear in the selection

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
detail();

To get the number of found details, type

int nd = [Link](<ctag>).geom(<tag>).
defeaturing("Fillets").detail().size();

To get the names of the found details, type

String[] filletNames = [Link](<ctag>).geom(<tag>).


defeaturing("Fillets").detail().groupNames();

In general, a detail (fillet in this case) consists of a number of geometric entities. For
example, a fillet consists of a number of faces. To get the entity numbers in the nth
detail, type

int[] entities = [Link](<ctag>).geom(<tag>).


defeaturing("Fillets").detail().groupEntities(n);

To get the object that contains the nth detail, type

String oname = [Link](<ctag>).geom(<tag>).


defeaturing("Fillets").detail().groupObject(n);

To delete all details found, type

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
deleteAll(<ftag>);

This adds a feature, tagged <ftag>, that performs the deletion operation to the
geometry sequence, after the current feature, and build this feature. In this case, it adds
a DeleteFillets feature.

DEFEATURING TOOLS | 103


To delete a subset of the details found, type, for example

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
detail().setGroup(2,5);

to delete fillets number 2 and 5. You can also use, for example,

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
detail().addGroup(7,8);
[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
detail().removeGroup(3);

to add and remove details from the selection. Perform the deletion by typing

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
delete(<ftag>);

This adds a DeleteFillets feature tagged <ftag> after the current feature in the
geometry sequence.

DEFEATURING METHODS
[Link](<ctag>).geom(<tag>).feature(<ftag>).find() searches for
small details, for a defeaturing feature <ftag>.

[Link](<ctag>).geom(<tag>).defeaturing(tooltag).find()
searches for small details, for a defeaturing tool tooltag.

[Link](<ctag>).geom(<tag>).defeaturing(tooltag).detail().
selMethod manipulates the selection of details to remove, for a defeaturing tool
tooltag.

[Link](<ctag>).geom(<tag>).feature(<ftag>).detail().
selMethod manipulates the selection of details to remove, for a defeaturing feature
<ftag>.

[Link](<ctag>).geom(<tag>).defeaturing(tooltag).
delete(<ftag>) creates a defeaturing feature of type tooltag, tagged <ftag>, with
the properties currently specified in the defeaturing tool. The property delete of the
created feature is set to selected. If the feature <ftag> can be built, it is inserted in
the geometry sequence after the current feature, otherwise the feature is discarded.

[Link](<ctag>).geom(<tag>).defeaturing(tooltag).
deleteAll(<ftag>) creates a defeaturing feature of type tooltag, tagged <ftag>,
with the properties currently specified in the defeaturing tool. The property delete of
the created feature is set to all. If the feature <ftag> can be built, it is inserted in the
geometry sequence after the current feature, otherwise the feature is discarded.

104 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


DEFEATURING SELECTION METHODS
For a defeaturing selection sel the following methods are available, in addition to the
methods available for a general geometry selection.

Geometry Object Selection Methods in the COMSOL Multiphysics


Programming Reference Manual

The find method on the corresponding feature or defeaturing tool provides the
defeaturing selection with a list of details. Each detail is a group of geometric entities.
Group numbers, <groups>, is an array of integers that index into the list of details.

You can select groups either by explicitly referring to group numbers, or by selecting
geometric entities. In the latter case, any group that has nonempty intersection with
the provided entity selection is selected.

int[] [Link](<groups>) returns the group numbers for the selected groups.

[Link](<groups>) adds the specified groups to the selection.

[Link](<groups>) sets the selection groups.

[Link](<groups>) removes the specified groups from the selection.

String[] [Link]() returns a list of names of the groups found.

String [Link](<group>) returns the name of the geometry object that


contains the specified detail group.

int[] [Link](<group>) returns the entity numbers of the specified


detail group.

int [Link]() returns the number of detail groups found.

Defeaturing Tools — Detach Faces


Use the DetachFaces tool to detach faces from a solid object (the parent) to form a
new solid object (the child). Select the faces to detach and properties for the operation
like in the corresponding feature DetachFaces. The detach operation is performed
when you issue the command

[Link](<ctag>).geom(<tag>).defeaturing("DetachFaces").
delete(<ftag>);

DEFEATURING TOOLS | 105


Defeaturing Tools — Detect Interferences
Access the DetectInterferences tool by the command

GeomDefeature tool = [Link](<ctag>).geom(<tag>).


defeaturing("DetectInterferences");

To access the input objects selection, use

GeomObjectSelection input = [Link]("input");

To set the tolerance, use

[Link]("abstol", value);

To find interferences, type

[Link]();

To access the resulting interferences, use

GeomObjectGroupSelection interf = [Link]();

Each node listed in Interfering faces list in the user interface corresponds to a group
of faces in GeomObjectGroupSelection. To access the data for a group, use its integer
group index:

String label = [Link]()[group];


String objName = [Link](group);
int[] faces = [Link](group);
double gapSize = [Link](group)[0];

The face numbers in the groups do not refer to the input objects. Rather, they refer to
objects in a local state, where the tool has imprinted edges where objects interfere. To
hide faces in the local state, first type

[Link](true);

to enter the local state. After doing the hiding, type

[Link](false);

to exit the local state.

See also DetectInterferences.

Defeaturing Tools — Replace Faces


Use the ReplaceFaces tool to delete faces and replace them either with a new face or
by growing or shrinking the adjacent faces. Select the faces to replace and properties

106 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


for the operation like in the corresponding feature ReplaceFaces. The faces are
replaced when you issue the command

[Link](<ctag>).geom(<tag>).defeaturing("ReplaceFaces").
delete(<ftag>);

This adds a ReplaceFaces feature tagged <ftag> after the current feature in the
geometry sequence.

DEFEATURING TOOLS | 107


Summary of Commands

108 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


• Angle • Import 3D CAD
• Array • InterpolationCurve
• BezierPolygon • Knit
• CapFaces • LineSegment
• Chamfer • Loft
• Chamfer3D • Midsurface
• Check • Mirror
• Circle • Move
• CircularArc • OffsetFaces
• Coincident • Parallel
• Concentric • Perpendicular
• ConvertToCOMSOL • Point
• Copy • Polygon
• CubicBezier • Position
• DeleteFillets • Projection
• DeleteHoles • QuadraticBezier
• DeleteShortEdges • Radius
• DeleteSliverFaces • Rectangle
• DeleteSmallFaces • Repair
• DeleteSpikes • ReplaceFaces
• DetachFaces • Rotate
• DetectInterferences • Scale
• DirectedDistance • Square
• Distance • TangentConstraint
• Ellipse • Thicken
• EqualDistance • TotalEdgeLength
• EqualRadius • TransformFaces
• Export, ExportFinal • Vertical
• Fillet • XDistance
• Fillet3D • YDistance
• Horizontal

SUMMARY OF COMMANDS | 109


Commands Grouped by Function
Commands for Creating and Modifying Geometry in 2D

FUNCTION PURPOSE

Projection Project 3D objects and entities to a 2D work plane

The Design Module enables on/off properties for constraining the other properties of
2D geometric primitive and operation commands. The property name is obtained by
appending constr to available property names. The default is on in operation features
and usually off in primitive features. A constrained property cannot be modified by
constraint and dimension commands. Properties that do not have a constr property
are always constrained. With the Design Module some features also have properties for
controlling a corresponding symbol in the Graphics window.

The following 2D geometry features get additional properties with the Design
Module.

• Array • LineSegment
• BezierPolygon • Mirror
• Chamfer • Move
• Circle • Point
• CircularArc • Polygon
• Copy • QuadraticBezier
• CubicBezier • Rectangle
• Ellipse • Rotate
• Fillet • Scale
• InterpolationCurve • Square

110 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


Commands for Creating Constraints in 2D

FUNCTION PURPOSE

Coincident Constrain two geometric entities to coincide with


each other
Concentric Constrain circular edges and vertices to have the
same center
EqualDistance Constrain the distances between two pairs of
geometric entities to be equal
EqualRadius Constrain two circular edges to have the same
radius
Horizontal Constrain straight edges to be parallel to the x-axis
Parallel Constrain straight edges to be parallel
Perpendicular Constrain two straight edges to be perpendicular
TangentConstraint Constrain two edges to be tangent
Vertical Constrain straight edges to be parallel to the y-axis

Commands for Creating Dimensions in 2D

FUNCTION PURPOSE

Angle Constrain the angle between two edges


DirectedDistance Constrain the distance between two geometric
entities in a given direction
Distance Constrain the distance between two geometric
entities
Position Constrain the x- and y-coordinates of a point
Radius Constrain the radius of a circular edge
TotalEdgeLength Constrain the total length for a set of edges
XDistance Constrain the distance in the x direction between
entities
YDistance Constrain the distance in the y direction between
entities

COMMANDS GROUPED BY FUNCTION | 111


Commands for Defeaturing

FUNCTION PURPOSE

DeleteFillets Find and delete fillets in CAD objects


DeleteHoles Find and delete holes in CAD objects
DeleteShortEdges Find and delete short edges in CAD objects
DeleteSliverFaces Find and delete sliver faces in CAD objects
DeleteSmallFaces Find and delete small faces in CAD objects
DeleteSpikes Find and delete spikes in CAD objects
DetachFaces Detach faces from CAD objects to form a new
solid
DetectInterferences Detect intersections, touches, gaps, and
containments between CAD objects
ReplaceFaces Delete faces from CAD objects and heal the
wounds

Commands for File Import, Export, Conversion, and Repair

FUNCTION PURPOSE

Check Check the validity of CAD objects


ConvertToCOMSOL Convert CAD Import Module geometry objects to
COMSOL objects
Export, ExportFinal Export geometry objects to a 3D CAD file
Import 3D CAD Import geometry objects from a 3D CAD file
Knit Knit surface CAD objects to form solids or surface
objects
Repair Repair CAD objects

Commands for Creating and Modifying Geometry in 3D

FUNCTION PURPOSE

CapFaces Add cap faces to fill holes in CAD geometries


Chamfer3D Chamfer edges in 3D geometry objects
Fillet3D Fillet edges in 3D geometry objects
Loft Create a lofted surface through a set of profile
curves

112 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


FUNCTION PURPOSE

OffsetFaces Offset faces of 3D objects in the normal direction


Midsurface Generate a surface object that is the midsurface of
a solid object in 3D
Thicken Generate a solid object by thickening a surface
object in 3D
TransformFaces Transform faces of 3D objects by displacing,
rotating, and scaling

COMMANDS GROUPED BY FUNCTION | 113


Commands in Alphabetical Order
Angle
Constrains two edges to meet at a given angle.

DESCRIPTION

TABLE 3-1: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge1 Selection First edge


reverse1 on | off off Reverse the direction of the
first ray
edge2 Selection Second edge
reverse2 on | off off Reverse the direction of the
second ray
angle double 0 Angle
angleconstr on | off on Determine whether the
dimension is a constraining
dimension (on) or measuring
dimension (off)
createpar on | off off Generate parameter from
dimension
parname String "" Specify parameter name if
createpar is on
helppoint1 double[2] {0, 0} First help point
helppoint2 double[2] {0, 0} Second help point
arrowradius double Empty Radius of circular arrow
symbol in the Graphics
window
labelpos double 0.5 Relative label position along
the arrow symbol in Graphics
window
arrowint on | off on Display internal or external
arrow in Graphics window

SEE ALSO
TangentConstraint

114 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


Array
The following additional properties are available with the Design Module.
TABLE 3-2: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

displconstr String[2] {on, on} Constrain the displacement. Constrained


properties cannot be modified by
constraint and dimension functions.

BezierPolygon
The following additional properties are available with the Design Module.
TABLE 3-3: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

pconstr String[] {} Constrain the control points. Constrained


properties cannot be modified by
constraint and dimension functions.

CapFaces

PURPOSE
Add cap faces to objects.

SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"CapFaces");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"CapFaces")
creates a CapFaces feature. A cap face is created for each loop of edges in the input
selection. The cap faces are joined with the original objects. If new domains are created
by the cap faces, these domains are made solid.

COMMANDS IN ALPHABETICAL ORDER | 115


The input selection can contain more than one edge loop, but no two loops can have
edges or vertices in common.

The input selection can contain edges from more than one object. In this case, each
object is processed individually.
TABLE 3-4: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection The input edges.


groupadjedg on | off off Extend edge selection to
adjacent edge loop or chain.
selresult on | off off Create selections of all
resulting objects.
selresultshow all | obj | dom Show selections of resulting
dom | bnd | objects in physics, materials,
edg | pnt | and so on, or in part
off instances. obj is not available
in a component’s geometry.
dom, bnd, and edg are not
available in all features.
contributeto String none Tag of cumulative selection to
contribute to.

The following attributes are available:


TABLE 3-5: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

Chamfer
The following additional properties are available with the Design Module.
TABLE 3-6: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

distconstr on | off off Constrain the distance. Constrained


properties cannot be modified by
constraint and dimension functions.

116 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


Chamfer3D
Chamfer edges in 3D geometry objects.

SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Chamfer3D");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Chamfer3D")

creates a Chamfer3D feature.

Use [Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("edge") to select the edge to chamfer. The default selection is empty.

TABLE 3-7: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge Selection Edges to chamfer.


radius double 0 Radius.
propagate on | off on Propagate to tangent edges.
preserveoverlapped on | off off Preserve overlapped entities.
yshaped on | off off Y-shaped chamfer.
createselection on | off off Create selections.
selresult on | off off Create selections of all
resulting objects.

COMMANDS IN ALPHABETICAL ORDER | 117


TABLE 3-7: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selresultshow all | obj | dom Show selections of resulting


dom | bnd objects in physics, materials,
| edg | pnt and so on, or in part
| off instances. obj is not available
in a component’s geometry.
dom, bnd, and edg are not
available in all features.
contributeto String none Tag of cumulative selection to
contribute to.
For information about the createselection and contributeto properties, search
the online help in COMSOL Multiphysics to locate and search all the documentation.

The following attributes are available:


TABLE 3-8: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

EXAMPLE
Chamfer a subset of edges on a block:

Model model = [Link]("Model1");


[Link]().create("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").geomRep("cadps");
[Link]("comp1").geom("geom1").create("blk1", "Block");
[Link]("comp1").geom("geom1").
create("cha1", "Chamfer3D");
[Link]("comp1").geom("geom1").feature("cha1").
selection("edge").set("blk1", new int[]{2, 4, 6, 8});
[Link]("comp1").geom("geom1").feature("cha1").
set("radius", "0.1");
[Link]("comp1").geom("geom1").run();

SEE ALSO
Fillet3D

118 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


Check
Check the validity of CAD objects.

SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Check");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property)

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Check") creates a check feature tagged <ftag>. The following
properties are available.
TABLE 3-9: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection Names of input objects

SEE ALSO
Repair

Circle
The following additional properties are available with the Design Module.
TABLE 3-10: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

rconstr on | off off Constrain the radius. Constrained


properties cannot be modified by
constraint and dimension functions.
angleconstr on | off on Constrain the sector angle.
Constrained properties cannot be
modified by constraint and dimension
functions.
posconstr String[2] {off, off} Constrain the position. Constrained
properties cannot be modified by
constraint and dimension functions.

COMMANDS IN ALPHABETICAL ORDER | 119


TABLE 3-10: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

rotconstr on | off on Constrain the rotation angle.


Constrained properties cannot be
modified by constraint and dimension
functions.
arrowangdispl double 0 Angular displacement of arrow symbol
relative to middle of edge.
labelradius double 0.5 Relative label position along arrow
symbol.

CircularArc
The following additional properties are available with the Design Module.
TABLE 3-11: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

centerconstr String[2] {off, off} Constrain the center. Constrained


properties cannot be modified by
constraint and dimension functions.
point1constr String[2] {off, off} Constrain the starting point.
Constrained properties cannot be
modified by constraint and dimension
functions.
point2constr String[2] {off, off} Constrain the endpoint. Constrained
properties cannot be modified by
constraint and dimension functions.
rconstr on | off off Constrain the radius. Constrained
properties cannot be modified by
constraint and dimension functions.
angle1constr on | off off Constrain the start angle. Constrained
properties cannot be modified by
constraint and dimension functions.
angle2constr on | off off Constrain the end angle. Constrained
properties cannot be modified by
constraint and dimension functions.

120 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


Coincident

PURPOSE
Constrain two geometric entities to coincide with each other.

DESCRIPTION

TABLE 3-12: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

entity1 Selection First entity (vertex or edge)


entity2 Selection Second entity (vertex or
edge)
helppoint1 double[2] {0, 0} First help point
helppoint2 double[2] {0, 0} Second help point
symbolentity 1|2 1 The entity the symbol in the
Graphics window is attached
to
symboledgpar double 0.5 Normalized edge parameter
for positioning the symbol in
the Graphics window
symboledgdispl double 20 Symbol displacement in left
normal direction from edge
(in pixels)
symbolvtxdispl double[2] {20, 20} Symbol displacement from
vertex (in pixels)

Concentric

PURPOSE
Constrain circular edges and vertices to have the same center.

COMMANDS IN ALPHABETICAL ORDER | 121


DESCRIPTION

TABLE 3-13: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge Selection Circular edges


vertex Selection Vertices
symboledg Selection Edge the symbol in the
Graphics window is attached
to
symboledgpar double 0.5 Normalized edge parameter
for positioning the symbol in
the Graphics window
symboledgdispl double 20 Symbol displacement in left
normal direction from edge
(in pixels)
symbolvtx Selection Vertex the symbol in the
Graphics window is attached
to
symbolvtxdispl double[2] {20, 20} Symbol displacement from
vertex (in pixels)

ConvertToCOMSOL
Convert CAD objects to COMSOL objects.

SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"ConvertToCOMSOL");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"ConvertToCOMSOL")

122 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


creates a ConvertToCOMSOL feature.
TABLE 3-14: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection Names of input objects.


selresult on | off off Create selections of all
resulting objects.
selresultshow all | obj | dom Show selections of resulting
dom | bnd | objects in physics, materials,
edg | pnt | and so on, or in part
off instances. obj is not available
in a component’s geometry.
dom, bnd, and edg are not
available in all features.
contributeto String none Tag of cumulative selection to
contribute to.

The following attributes are available:


TABLE 3-15: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

SEE ALSO
Import 3D CAD

COMMANDS IN ALPHABETICAL ORDER | 123


Copy
The following additional properties are available with the Design Module.
TABLE 3-16: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

displxconstr on | off on Constrain the x-displacement.


Constrained properties cannot be
modified by constraint and dimension
functions.
displyconstr on | off on Constrain the y-displacement.
Constrained properties cannot be
modified by constraint and dimension
functions.

CubicBezier
The following additional properties are available with the Design Module.
TABLE 3-17: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

pconstr String[4] {off, off, Constrain the control points.


off, off} Constrained properties cannot be
modified by constraint and dimension
functions.

DeleteFillets
Find and delete fillets in CAD objects.

124 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"DeleteFillets");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).find();
[Link](<ctag>).geom(<tag>).feature(<ftag>).detail();

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
selection(property);
[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
set(property,<value>);
[Link](<ctag>).geom(<tag>).defeaturing("Fillets").find();
[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
detail();
[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
delete(<ftag>);
[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
deleteAll(<ftag>);

DESCRIPTION
[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
delete(<ftag>)

creates a DeleteFillets feature tagged <ftag> with the specified properties. The
property delete is set to selected. If the feature can be built, it is inserted in the
geometry sequence after the current feature; otherwise, the feature is discarded.

[Link](<ctag>).geom(<tag>).defeaturing("Fillets").
deleteAll(<ftag>) works as the delete method, but the property delete is set to
all.

It is also possible to create the DeleteFillets feature using the standard create
method. The following properties are available.
TABLE 3-18: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

delete all | selected selected Delete all fillets of given size, or


a selection. Only available for
the feature.
minentsize double 0 Minimum fillet radius.
entsize double 1e-3 Maximum fillet radius.

COMMANDS IN ALPHABETICAL ORDER | 125


TABLE 3-18: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection Names of input objects.


selresult on | off off Create selections of all resulting
objects.
selresultshow all | obj | dom | dom Show selections of resulting
bnd | edg | pnt | objects in physics, materials, and
off so on, or in part instances. obj
is not available in a component’s
geometry. dom, bnd, and edg
are not available in all features.
contributeto String none Tag of cumulative selection to
contribute to.
[Link](<ctag>).geom(<tag>).feature(<ftag>).find() searches
the input objects for fillets with radius less than entsize.

[Link](<ctag>).geom(<tag>).feature(<ftag>).detail() returns a
selection object where you can select a subset of the fillets found.

The find and detail methods of

[Link](<ctag>).geom(<tag>).defeaturing("Fillets")

have the corresponding functionality for the defeaturing tool.

Only faces that can be deleted without invalidating the object are deleted. If a fillet was
not possible to delete, a warning is given, accessible through
[Link](<tag>).feature(<ftag>).problem().

COMPATIBILITY
The following property is no longer supported:
TABLE 3-19: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables


ptx

EXAMPLE
The following example imports the CAD object in the COMSOL Multiphysics
geometry file defeaturing_demo_3.mphbin and finds all fillets with radius less than
4·10−3. The first of these fillets is deleted.

Model model = [Link]("Model1");

126 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename", "defeaturing_demo_3.mphbin");
[Link]("comp1").geom("geom1").run("imp1");
[Link]("comp1").geom("geom1").feature().
create("dfi1","DeleteFillets");
[Link]("comp1").geom("geom1").feature("dfi1").
selection("input").
set("imp1");
[Link]("comp1").geom("geom1").feature("dfi1").
set("entsize",4e-3);
[Link]("comp1").geom("geom1").feature("dfi1").find();
[Link]("comp1").geom("geom1").feature("dfi1").detail().
setGroup(1);
[Link]("comp1").geom("geom1").run();

SEE ALSO
ReplaceFaces

DeleteHoles
Find and delete holes in CAD objects.

COMMANDS IN ALPHABETICAL ORDER | 127


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"DeleteHoles");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).find();
[Link](<ctag>).geom(<tag>).feature(<ftag>).detail();

[Link](<ctag>).geom(<tag>).defeaturing("Holes").
selection(property);
[Link](<ctag>).geom(<tag>).defeaturing("Holes").
set(property,<value>);
[Link](<ctag>).geom(<tag>).defeaturing("Holes").find();
[Link](<ctag>).geom(<tag>).defeaturing("Holes").detail();
[Link](<ctag>).geom(<tag>).defeaturing("Holes").
delete(<ftag>);
[Link](<ctag>).geom(<tag>).defeaturing("Holes").
deleteAll(<ftag>);

DESCRIPTION
[Link](<ctag>).geom(<tag>).defeaturing("Holes").
delete(<ftag>) creates a DeleteHoles feature tagged <ftag> with the specified
properties. The property delete is set to selected. If the feature can be built, it is
inserted in the geometry sequence after the current feature; otherwise, the feature is
discarded.

[Link](<ctag>).geom(<tag>).defeaturing("Holes").
deleteAll(<ftag>) works as the delete method, but the property delete is set to
all.

It is also possible to create the DeleteHoles feature using the standard create
method. The following properties are available.
TABLE 3-20: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

delete all | selected selected Delete all holes of given size, or


a selection. Only available for
the feature
minentsize double 0 Minimum hole radius
entsize double 1e-3 Maximum hole radius
input Selection Names of input objects

128 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


TABLE 3-20: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selresult on | off off Create selections of all resulting


objects
selresultshow all | obj | dom | dom Show selections of resulting
bnd | edg | pnt | objects in physics, materials, and
off so on, or in part instances. obj
is not available in a component’s
geometry. dom, bnd, and edg
are not available in all features
contributeto String none Tag of cumulative selection to
contribute to
[Link](<ctag>).geom(<tag>).feature(<ftag>).find() searches
the input objects for holes with radius less than entsize.

[Link](<ctag>).geom(<tag>).feature(<ftag>).detail() returns a
selection object where you can select a subset of the holes found.

The find and detail methods of


[Link](<ctag>).geom(<tag>).defeaturing("Holes") have the
corresponding functionality for the defeaturing tool.

Only faces that can be deleted without invalidating the object are deleted. If a hole was
not possible to delete, a warning is given, accessible through
[Link](<ctag>).geom(<tag>).feature(<ftag>).problem().

COMPATIBILITY
The following property is no longer supported:
TABLE 3-21: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables


ptx

EXAMPLE
The following example imports the CAD object in the COMSOL Multiphysics
geometry file defeaturing_demo_3.mphbin and finds all holes with radius less than
4·10−2. The first four of these holes are deleted.

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);

COMMANDS IN ALPHABETICAL ORDER | 129


[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename", "defeaturing_demo_3.mphbin");
[Link]("comp1").geom("geom1").run("imp1");
[Link]("comp1").geom("geom1").feature().
create("dho1","DeleteHoles");
[Link]("comp1").geom("geom1").feature("dho1").
selection("input").
set("imp1");
[Link]("comp1").geom("geom1").feature("dho1").
set("entsize",4e-2);
[Link]("comp1").geom("geom1").feature("dho1").find();
[Link]("comp1").geom("geom1").feature("dho1").
detail().setGroup(1, 2, 3, 4);
[Link]("comp1").geom("geom1").run();

SEE ALSO
ReplaceFaces

DeleteShortEdges
Find and delete short edges in CAD objects.

130 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"DeleteShortEdges");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).find();
[Link](<ctag>).geom(<tag>).feature(<ftag>).detail();

[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges").
selection(property);
[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges").
set(property,<value>);
[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges").
find();
[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges").
detail();
[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges").
delete(<ftag>);
[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges").
deleteAll(<ftag>);

DESCRIPTION
[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges").
delete(<ftag>) creates a DeleteShortEdges feature tagged <ftag> with the
specified properties. The property delete is set to selected. If the feature can be
built, it is inserted in the geometry sequence after the current feature; otherwise, the
feature is discarded.

[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges").
deleteAll(<ftag>) works as the delete method, but the property delete is set to
all.

It is also possible to create a DeleteShortEdges feature using the standard create


method. The following properties are available.
TABLE 3-22: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

delete all | selected selected Delete all edges of given size, or


a selection. Only available for the
feature.
entsize double 1e-3 Maximum edge length

COMMANDS IN ALPHABETICAL ORDER | 131


TABLE 3-22: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection Names of input objects


selresult on | off off Create selections of all resulting
objects.
selresultshow all | obj | dom | dom Show selections of resulting
bnd | edg | pnt | objects in physics, materials, and
off so on, or in part instances. obj is
not available in a component’s
geometry. dom, bnd, and edg are
not available in all features.
contributeto String none Tag of cumulative selection to
contribute to.
[Link](<ctag>).geom(<tag>).feature(<ftag>).find() searches
the input objects for edges of length less than entsize.

[Link](<ctag>).geom(<tag>).feature(<ftag>).detail() returns a
selection object where you can select a subset of the edge sets found.

The find and detail methods of


[Link](<ctag>).geom(<tag>).defeaturing("ShortEdges") have
the corresponding functionality for the defeaturing tool.

Only edges that can be deleted without invalidating the object are deleted. If an edge
was not possible to delete, a warning is given, accessible through
[Link](<ctag>).geom(<tag>).feature(<ftag>).problem().

COMPATIBILITY
The lengths of the edges are no longer returned.

The following property is no longer supported:


TABLE 3-23: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables


ptx

EXAMPLE
The following example imports the file defeaturing_demo_4.x_b and finds all edges
with length less than 3·10−3. The first of these edges is deleted.

Model model = [Link]("Model1");


[Link]("comp1");

132 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename", "defeaturing_demo_4.x_b");
[Link]("comp1").geom("geom1").runAll();
[Link]("comp1").geom("geom1").feature().
create("dse1","DeleteShortEdges");
[Link]("comp1").geom("geom1").feature("dse1").
selection("input").
set("imp1");
[Link]("comp1").geom("geom1").feature("dse1").
set("entsize",3e-3);
[Link]("comp1").geom("geom1").feature("dse1").find();
[Link]("comp1").geom("geom1").feature("dse1").
detail().setGroup(1);
[Link]("comp1").geom("geom1").runAll();

DeleteSliverFaces
Find and delete sliver faces in CAD objects.

SYNTAX
[Link](<ctag>).geom(gname).feature().
create(<ftag>,"DeleteSliverFaces");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).find();
[Link](<ctag>).geom(<tag>).feature(<ftag>).detail();

[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces").
selection(property);
[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces").
set(property,<value>);
[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces").
find();
[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces").
detail();
[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces").
delete(<ftag>);
[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces").
deleteAll(<ftag>);

COMMANDS IN ALPHABETICAL ORDER | 133


DESCRIPTION
[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces").
delete(<ftag>) creates a DeleteSliverFaces feature tagged <ftag> with the
specified properties. The property delete is set to selected. If the feature can be
built, it is inserted in the geometry sequence after the current feature; otherwise, the
feature is discarded.

[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces").
deleteAll(<ftag>) works as the delete method, but the property delete is set to
all.

It is also possible to create a DeleteSliverFaces feature using the standard create


method. The following properties are available.
TABLE 3-24: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

delete all | selected selected Delete all sliver faces of given


width, or a selection. Only
available for the feature.
entsize double 1e-3 Maximum face width.
input Selection Names of input objects.
selresult on | off off Create selections of all resulting
objects.
selresultshow all | obj | dom | dom Show selections of resulting
bnd | edg | pnt | objects in physics, materials, and
off so on, or in part instances. obj is
not available in a component’s
geometry. dom, bnd, and edg are
not available in all features.
contributeto String none Tag of cumulative selection to
contribute to.

Sliver faces are narrow but long faces with large aspect ratio, which usually give rise to
extremely fine local meshes in their vicinity.

[Link](<ctag>).geom(<tag>).feature(<ftag>).find() searches
the input objects for faces with width less than entsize.

[Link](<ctag>).geom(<tag>).feature(<ftag>).detail() returns a
selection object where you can select a subset of the faces found.

134 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


The find and detail methods of
[Link](<ctag>).geom(<tag>).defeaturing("SliverFaces") have
the corresponding functionality for the defeaturing tool.

Only faces that can be deleted without invalidating the object are deleted. If a face was
not possible to delete, a warning message is given.

COMPATIBILITY
The following property is no longer supported:
TABLE 3-25: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables


ptx | status

EXAMPLE
The following example imports the geometry model from the file
−3
defeaturing_demo_5.x_b, finds sliver faces narrower than 2·10 , and deletes the
first of these.

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename", "defeaturing_demo_5.x_b");
[Link]("comp1").geom("geom1").runAll();
[Link]("comp1").geom("geom1").feature().
create("dsl1","DeleteSliverFaces");
[Link]("comp1").geom("geom1").feature("dsl1").
selection("input").
set("imp1");
[Link]("comp1").geom("geom1").feature("dsl1").
set("entsize",2e-3);
[Link]("comp1").geom("geom1").feature("dsl1").find();
[Link]("comp1").geom("geom1").feature("dsl1").detail().
setGroup(1);
[Link]("comp1").geom("geom1").runAll();

SEE ALSO
ReplaceFaces, DeleteSmallFaces

COMMANDS IN ALPHABETICAL ORDER | 135


DeleteSmallFaces
Find and delete small faces in CAD objects.

SYNTAX
[Link](<ctag>).geom(gname).feature().
create(<ftag>,"DeleteSmallFaces");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).find();
[Link](<ctag>).geom(<tag>).feature(<ftag>).detail();

[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces").
selection(property);
[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces").
set(property,<value>);
[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces").
find();
[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces").
detail();
[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces").
delete(<ftag>);
[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces").
deleteAll(<ftag>);

DESCRIPTION
[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces").
delete(<ftag>) creates a DeleteSmallFaces feature tagged <ftag> with the
specified properties. The property delete is set to selected. If the feature can be
built, it is inserted in the geometry sequence after the current feature; otherwise, the
feature is discarded.

[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces").
deleteAll(<ftag>) works as the delete method, but the property delete is set to
all.

136 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


It is also possible to create a DeleteSmallFaces feature using the standard create
method. The following properties are available.
TABLE 3-26: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

delete all | selected selected Delete all small faces of given


size, or a selection. Only
available for the feature.
entsize double 1e-3 Maximum face size.
input Selection Names of input objects.
selresult on | off off Create selections of all resulting
objects.
selresultshow all | obj | dom | dom Show selections of resulting
bnd | edg | pnt | objects in physics, materials, and
off so on, or in part instances. obj is
not available in a component’s
geometry. dom, bnd, and edg are
not available in all features.
contributeto String none Tag of cumulative selection to
contribute to.

A small face is a face that fits within a sphere of specified radius, given in the property
entsize.

[Link](<ctag>).geom(<tag>).feature(<ftag>).find() searches
the input objects for faces with size less than entsize.

[Link](<ctag>).geom(<tag>).feature(<ftag>).detail() returns a
selection object where you can select a subset of the faces found.

The find and detail methods of


[Link](<ctag>).geom(<tag>).defeaturing("SmallFaces") have
the corresponding functionality for the defeaturing tool.

Only faces that can be deleted without invalidating the object are deleted. If a face was
not possible to delete, a warning message is given, accessible through
[Link](<ctag>).geom(<tag>).feature(<ftag>).problem().

COMMANDS IN ALPHABETICAL ORDER | 137


COMPATIBILITY
The following property is no longer supported:
TABLE 3-27: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables.


ptx | status

EXAMPLE
The following example imports the geometry model from the file
−3
defeaturing_demo_6.x_b, finds sliver faces narrower than 10 , and deletes the first
of these.

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename", "defeaturing_demo_6.x_b");
[Link]("comp1").geom("geom1").runAll();
[Link]("comp1").geom("geom1").feature().
create("df1","DeleteSmallFaces");
[Link]("comp1").geom("geom1").feature("df1").
selection("input").
set("imp1");
[Link]("comp1").geom("geom1").feature("df1").find();
[Link]("comp1").geom("geom1").feature("df1").detail().
setGroup(1);
[Link]("comp1").geom("geom1").run();

SEE ALSO
ReplaceFaces, DeleteSliverFaces

DeleteSpikes
Find and delete spikes in CAD objects.

138 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"DeleteSpikes");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).find();
[Link](<ctag>).geom(<tag>).feature(<ftag>).detail();

[Link](<ctag>).geom(<tag>).defeaturing("Spikes").
selection(property);
[Link](<ctag>).geom(<tag>).defeaturing("Spikes").
set(property,<value>);
[Link](<ctag>).geom(<tag>).defeaturing("Spikes").find();
[Link](<ctag>).geom(<tag>).defeaturing("Spikes").detail();
[Link](<ctag>).geom(<tag>).defeaturing("Spikes").
delete(<ftag>);
[Link](<ctag>).geom(<tag>).defeaturing("Spikes").
deleteAll(<ftag>);

DESCRIPTION
[Link](<ctag>).geom(<tag>).defeaturing("DeleteSpikes").
delete(<ftag>) creates a DeleteSpikes feature tagged <ftag> with the specified
properties. The property delete is set to selected. If the feature can be built, it is
inserted in the geometry sequence after the current feature; otherwise, the feature is
discarded.

[Link](<ctag>).geom(<tag>).defeaturing("DeleteSpikes").
deleteAll(<ftag>) works as the delete method, but the property delete is set to
all.

It is also possible to create a DeleteSpikes feature using the standard create


method. The following properties are available.
TABLE 3-28: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

delete all | selected selected Delete all spikes of given width,


or a selection. Only available for
the feature.
entsize double 1e-3 Maximum spike width.
input Selection Names of input objects.

COMMANDS IN ALPHABETICAL ORDER | 139


TABLE 3-28: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selresult on | off off Create selections of all resulting


objects.
selresultshow all | obj | dom | dom Show selections of resulting
bnd | edg | pnt | objects in physics, materials, and
off so on, or in part instances. obj is
not available in a component’s
geometry. dom, bnd, and edg are
not available in all features.
contributeto String none Tag of cumulative selection to
contribute to.
A spike is a long and narrow protrusion on an edge or corner of a face defined by two
or three edges.

[Link](<ctag>).geom(<tag>).feature(<ftag>).find() searches
the input objects for spikes of width less than entsize.

[Link](<ctag>).geom(<tag>).feature(<ftag>).detail() returns a
selection object where you can select a subset of the spikes found.

The find and detail methods of


[Link](<ctag>).geom(<tag>).defeaturing("Spikes") have the
corresponding functionality for the defeaturing tool.

Only spikes that can be deleted without invalidating the object are deleted. If a spike
was not possible to delete, a warning message is given, accessible through
[Link](<ctag>).geom(<tag>).feature(<ftag>).problem().

COMPATIBILITY
The width of each spike is no longer returned.

The following property is no longer supported:


TABLE 3-29: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables.


ptx | status

140 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


EXAMPLE
The following example imports the geometry model from the file
defeaturing_demo_7.x_b, finds all spikes narrower than 10−4, and deletes the first
of these.

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename", "defeaturing_demo_7.x_b");
[Link]("comp1").geom("geom1").runAll();
[Link]("comp1").geom("geom1").feature().
create("dsp1","DeleteSpikes");
[Link]("comp1").geom("geom1").feature("dsp1").
selection("input").
set("imp1");
[Link]("comp1").geom("geom1").feature("dsp1").
set("entsize",1e-4);
[Link]("comp1").geom("geom1").feature("dsp1").find();
[Link]("comp1").geom("geom1").feature("dsp1").detail().
setGroup(1);
[Link]("comp1").geom("geom1").runAll();

SEE ALSO
DeleteShortEdges, DeleteSliverFaces

DetachFaces
Detach faces from CAD objects to form a new (child) solid.

COMMANDS IN ALPHABETICAL ORDER | 141


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"DetachFaces");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);

[Link](<ctag>).geom(<tag>).defeaturing("DetachFaces").
selection(property);
[Link](<ctag>).geom(<tag>).defeaturing("DetachFaces").
set(property,<value>);
[Link](<ctag>).geom(<tag>).defeaturing("DetachFaces").
delete(<ftag>);

DESCRIPTION
[Link](<ctag>).geom(<tag>).defeaturing("DetachFaces").
delete(<ftag>) creates a DetachFaces feature tagged <ftag> with the specified
properties. If the feature can be built, it is inserted in the geometry sequence after the
current feature; otherwise, the feature is discarded.

It is also possible to create a DetachFaces feature using the standard create method.
TABLE 3-30: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection Faces to detach.


healchild fill | patchparent Healing method used on the
patchchild | child object.
patchparent
healparent fill | patch patch Healing method used on the
parent object.
selresult on | off off Create selections of all
resulting objects.
selresultshow all | obj | dom dom Show selections of resulting
| bnd | edg | objects in physics, materials,
pnt | off and so on, or in part
instances. obj is not available
in a component’s geometry.
dom, bnd, and edg are not
available in all features.
contributeto String none Tag of cumulative selection
to contribute to.

142 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


The faces in the property input are detached from their parent object. A new solid,
the child object, are formed from the detached faces. The output objects are the healed
parent and child objects.

The property healparent determines how the parent object is healed to form a new
solid after detaching the faces. The value fill means that a new face is formed based
on the surrounding edges of each wound. The value patch means that the
surrounding faces of each wound are grown or shrunk.

The property healchild determines how the child solid is constructed from the
detached faces. The value fill means that a new face is formed based on the
surrounding edges of each wound. The value patchchild means that the detached
faces are grown or shrunk to form a solid. The value patchparent means that the
parent faces surrounding the detached faces are grown or shrunk to form a solid
together with the detached faces.

EXAMPLE
The following example imports the COMSOL Multiphysics geometry file
defeaturing_demo_2.mphbin and detaches a hole defined by a set of faces:

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename", "defeaturing_demo_2.mphbin");
[Link]("comp1").geom("geom1").runAll();
[Link]("comp1").geom("geom1").feature().
create("det1","DetachFaces");
[Link]("comp1").geom("geom1").feature("det1").
selection("input").set("imp1",6,7,8,9,11,12,13);
[Link]("comp1").geom("geom1").runAll();

COMPATIBILITY
The following property is no longer supported:
TABLE 3-31: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables


ptx

SEE ALSO
ReplaceFaces

COMMANDS IN ALPHABETICAL ORDER | 143


DetectInterferences
Detect intersections, touches, gaps, and containments between CAD objects.

SYNTAX
[Link](<ctag>).geom(<tag>).
defeaturing("DetectInterferences").selection(property);
[Link](<ctag>).geom(<tag>).
defeaturing("DetectInterferences").set(property,<value>);
[Link](<ctag>).geom(<tag>).
defeaturing("DetectInterferences").selection(property);
[Link](<ctag>).geom(<tag>).
defeaturing("DetectInterferences").find();
[Link](<ctag>).geom(<tag>).
defeaturing("DetectInterferences").detail();

DESCRIPTION
See Defeaturing Tools — Detect Interferences.

Available properties:
TABLE 3-32: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection Input objects


abstol double 0.1[mm] Absolute tolerance
showingraphics interferingonly | selecte Objects to show in graphics
selected | other d
| both | all
groupbyobject boolean false Group interferences by
object in GUI

DirectedDistance

PURPOSE
Constrain the distance in a given direction between two geometric entities to a given
value.

144 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


DESCRIPTION

TABLE 3-33: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

entity1 Selection First entity (vertex or curved


edge)
entity2 Selection Second entity (vertex or
curved edge)
direction vector | vector Direction
parallel |
perpendicul
ar
vector double[2] {1, 0} Direction vector (used when
direction is vector)
edge Selection Straight edge determining the
direction (used when
direction is parallel or
perpendicular)
distance double 0 Distance
distanceconstr on | off on Determine whether the
dimension is a constraining
dimension (on) or measuring
dimension (off)
createpar on | off off Generate parameter from
dimension
parname String "" Specify parameter name if
createpar is on
helppoint1 double[2] {0, 0} First help point
helppoint2 double[2] {0, 0} Second help point
arrowdispl double Empty Displacement of arrow
symbol in the normal
direction
labelpos double 0.5 Relative label position along
arrow symbol
arrowint on | off on Internal or external arrow
symbol

SEE ALSO
Distance, XDistance, YDistance

COMMANDS IN ALPHABETICAL ORDER | 145


Distance

PURPOSE
Constrain the distance between two geometric entities to a given value.

DESCRIPTION

TABLE 3-34: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

entity1 Selection First entity (vertex or edge)


entity2 Selection Second entity (vertex or
edge)
distance double 0 Distance
distanceconstr on | off on Determine whether the
dimension is a constraining
dimension (on) or measuring
dimension (off)
createpar on | off off Generate parameter from
dimension
parname String "" Specify parameter name if
createpar is on
helppoint1 double[2] {0, 0} First help point
helppoint2 double[2] {0, 0} Second help point
arrowdispl double Empty Displacement of arrow
symbol in the normal
direction
labelpos double 0.5 Relative label position along
arrow symbol
arrowint on | off on Internal or external arrow
symbol

SEE ALSO
DirectedDistance, XDistance, YDistance, EqualDistance, TotalEdgeLength

146 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


Ellipse
The following additional properties are available with the Design Module.
TABLE 3-35: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

semiaxesconstr String[2] {off, off} Constrain the semiaxes. Constrained


properties cannot be modified by
constraint and dimension functions.
angleconstr on | off on Constrain the sector angle.
Constrained properties cannot be
modified by constraint and dimension
functions.
posconstr String[2] {off, off} Constrain the position. Constrained
properties cannot be modified by
constraint and dimension functions.
rotconstr on | off on Constrain the rotation angle.
Constrained properties cannot be
modified by constraint and dimension
functions.

EqualDistance

PURPOSE
Constrain the distances between two pairs of geometric entities to be equal.

COMMANDS IN ALPHABETICAL ORDER | 147


DESCRIPTION

TABLE 3-36: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

entity1 Selection First entity (vertex or edge)


entity2 Selection Second entity (vertex or
edge)
entity3 Selection Third entity (vertex or edge)
entity4 Selection Fourth entity (vertex or edge)
helppoint1 double[2] {0, 0} First help point
helppoint2 double[2] {0, 0} Second help point
helppoint3 double[2] {0, 0} Third help point
helppoint4 double[2] {0, 0} Fourth help point
arrowdispl double[2] Empty Displacement of arrow
symbols in the normal
direction
labelpos double[2] {0.5, 0.5} Relative label position along
arrow symbols
arrowint String[2] {on, on} Internal or external arrow
symbols
label String Label text

SEE ALSO
Distance

EqualRadius

PURPOSE
Constrain two circular edges to have the same radius.

148 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


DESCRIPTION

TABLE 3-37: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge1 Selection First circular edge


edge2 Selection Second circular edge
arrowangdispl double[2] {0, 0} Angular displacement of
arrow symbols relative to
middle of edges
labelradius double[2] {0.5, 0.5} Relative label position along
arrow symbols
label String Label text

SEE ALSO
Radius

Export, ExportFinal
Using the CAD Import Module, Design Module, or a LiveLink product for CAD
software, export selected geometry objects or the finalized geometry to a 3D CAD
format, such as ACIS, Parasolid, STEP, and IGES.

To export selected geometry objects to a file, first select the objects to export using

[Link](<ctag>).geom(<tag>).export().selection().set(<obj
names>);

where <objnames> is a string array of object names.

Set the file format using

[Link](<ctag>).geom(<tag>).export().setType(<format>);

where <format> determines the file format. See Table 3-38 for valid type value names
available with the CAD Import Module, Design Module, or a LiveLink product for
CAD software.
TABLE 3-38: FILE FORMATS SUPPORTED FOR EXPORT.

FILE FORMAT FILE EXTENSION TYPE VALUE

Parasolid Binary (3D) .x_b, .xmt_bin parasolidbin


Parasolid Text (3D) .x_t, .xmt_txt parasolidascii
ACIS Binary (3D) .sab acisbin
ACIS Text (3D) .sat acisascii

COMMANDS IN ALPHABETICAL ORDER | 149


TABLE 3-38: FILE FORMATS SUPPORTED FOR EXPORT.

FILE FORMAT FILE EXTENSION TYPE VALUE

IGES File (3D) .igs, .iges iges


STEP File (3D) .step, .stp step

Check which file format is set for the export using

String formatType =
[Link](<ctag>).geom(<tag>).export().getType();

To export the file enter

[Link](<ctag>).geom(<tag>).export(<filename>);

To export the finalized geometry to a file, enter

[Link](<ctag>).geom(<tag>).exportFinal(<filename>);

where <filename> is a string.

EXPORTING TO AN ACIS FILE


When exporting to an ACIS file you can set the ACIS file format version using

[Link](<ctag>).geom(<tag>).export().setAcisVersion(<vers
ion>);

where <version> is a string 4.0, 7.0, or 2016 1.0. Default is 2016 1.0.

EXPORTING TO A PARASOLID FILE


The Parasolid text or binary file generated by the export is of version 36.

When exporting to a Parasolid format, a unit conversion can optionally be performed


during export. Use the following method to select the export length unit:

[Link](<ctag>).geom(<tag>).export().setLengthUnit(<unit>
);

where <unit> is either fromgeom (default) to disable unit conversion or a COMSOL


Multiphysics length unit, such as m for meters or in for inches. To get the current value
of the export length unit type:

[Link](<ctag>).geom(<tag>).export().getLengthUnit();

To decide how the nonmanifold objects are exported use the following method:

[Link](<ctag>).geom(<tag>).export().setSplitInManifold(<
value>);

where <value> is either true (default) to split the objects into manifold objects during
the export, or false to export the unmodified objects.

150 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


EXPORTING TO AN IGES FILE
When exporting to the IGES format, a unit conversion can optionally be performed
during export. Use the following method to select the export length unit:

[Link](<ctag>).geom(<tag>).export().setLengthUnitIGES(<u
nit>);

where <unit> is either fromgeom (default) to disable unit conversion or a supported


length unit: uin, um, mil, mm, cm, in, ft, m, km, [Link] get the current value of the
export length unit type:

[Link](<ctag>).geom(<tag>).export().getLengthUnitIGES();

EXPORTING TO A STEP FILE


When exporting to the STEP format, a unit conversion can optionally be performed
during export. Use the following method to select the export length unit:

[Link](<ctag>).geom(<tag>).export().setLengthUnitSTEP(<u
nit>);

where <unit> is either fromgeom (default) to disable unit conversion or a supported


length unit: nm, uin, um, mil, mm, cm, in, dm, ft, m, km, mi. To get the current value of
the export length unit type:

[Link](<ctag>).geom(<tag>).export().getLengthUnitSTEP();

SEE ALSO
Import 3D CAD

Horizontal

PURPOSE
Constrains straight edges to be parallel to the x-axis.

COMMANDS IN ALPHABETICAL ORDER | 151


DESCRIPTION

TABLE 3-39: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge Selection Straight edges


symboledg Selection Edge the symbol in the Graphics window
is attached to
symboledgpar double 0.5 Normalized edge parameter for
positioning the symbol
symboledgdispl double 20 Symbol displacement in left normal
direction from edge (in pixels)

SEE ALSO
Angle, Parallel, Vertical

Fillet
The following additional properties are available with the Design Module.
TABLE 3-40: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

radiusconstr on | off off Constrain the radius. Constrained


properties cannot be modified by
constraint and dimension functions.

Fillet3D
Fillet edges in 3D geometry objects.

SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Fillet3D");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

152 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Fillet3D")

creates a Fillet3D feature.

Use [Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("edge") to select the edge to fillet. The default selection is empty.

TABLE 3-41: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge Selection Edges to fillet


radius double 0 Radius
propagate on | off on Propagate to tangent edges
preserveoverlapped on | off off Preserve overlapped entities
yshaped on | off off Y-shaped fillet
filletsharp on | off off Fillet sharp edges at vertices
createselection on | off off Create selections
selresult on | off off Create selections of all
resulting objects.
selresultshow all | obj | dom Show selections of resulting
dom | bnd objects in physics, materials,
| edg | pnt and so on, or in part instances.
| off obj is not available in a
component’s geometry. dom,
bnd, and edg are not available
in all features.
contributeto String none Tag of cumulative selection to
contribute to.

For information about the createselection and contributeto properties, search


the online help in COMSOL Multiphysics to locate and search all the documentation.

The following attributes are available:


TABLE 3-42: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

COMMANDS IN ALPHABETICAL ORDER | 153


EXAMPLE
Fillet a subset of edges on a block:

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").geomRep("cadps");
[Link]("comp1").geom("geom1").create("blk1", "Block");
[Link]("comp1").geom("geom1").
create("fil1", "Fillet3D");
[Link]("comp1").geom("geom1").feature("fil1").
selection("edge").set("blk1", new int[]{2, 4, 6, 8});
[Link]("comp1").geom("geom1").feature("fil1").
set("radius", "0.1");
[Link]("comp1").geom("geom1").run();

SEE ALSO
Chamfer3D

Import 3D CAD
Import geometry objects from a 3D CAD file using the CAD Import Module, Design
Module, or a LiveLink product for CAD software.

SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Import");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
importData();
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Import") creates an import feature. When the property filename

154 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


is set to a filename recognized as a 3D CAD file, the property type is set to cad. The
following properties are available.
TABLE 3-43: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

check on | off Check imported objects for


errors.
filename String Filename.
fillholes on | off off Attempt to generate new faces
to replace missing geometry if
the property knit is solid or
surface
importbodynames auto | on | off auto Include the body name in the
object name. This property is
available only when filename
is set to a STEP file extension.
Use auto to include the body
name only for multibody parts.
importtol double 1e-5 Absolute repair tolerance.
keepbnd on | off on Import surface objects.
keepfree on | off off Import curve and point objects.
keepsolid on | off on Import solid objects.
knit solid | surface | solid Knit together surface objects
off to form solids or surface
objects.
removeredundant on | off off Remove redundant edges and
vertices.
repair on | off on Repair imported objects.
simplify on | off on Simplify the underlying curve
and surface manifolds of
geometric entities
type cad Type of import.
unit source | current source Take length unit from file or
from the current geometry
unit.
unitecurves on | off on Unite curve objects.
selresult on | off off Create selections of all
resulting objects.

COMMANDS IN ALPHABETICAL ORDER | 155


TABLE 3-43: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selresultshow all | obj | dom | dom Show selections of resulting


bnd | edg | pnt | objects in physics, materials,
off and so on, or in part instances.
obj is not available in a
component’s geometry. dom,
bnd, and edg are not available
in all features.
contributeto String none Tag of cumulative selection to
contribute to.
The file to import is specified by filename, which can have of any of the following
formats:
TABLE 3-44: SUPPORTED 3D CAD FILE FORMATS.

FILE FORMAT NOTE FILE EXTENSION


® .sat, .sab
ACIS 1
® .dwg, .dxf
AutoCAD 1, 2
® .CATPart, .CATProduct
CATIA V5 2, 3
IGES 1 .igs, .iges
® .ipt, .iam
Inventor 1, 2
NX™ 1, 4 .prt
® .x_t, .x_b
Parasolid 1
PTC Creo Parametric™ 1 .prt, .asm
® .prt, .asm
PTC Pro/ENGINEER 1
® .sldprt, .sldasm
SOLIDWORKS 1, 2, 5
STEP 1 .step, .stp

Note 1: This format requires a license for the CAD Import Module, Design Module,
or a LiveLink product for a CAD package.

Note 2: This format is available only on supported Windows® operating systems.

Note 3: This format requires, in addition to the CAD Import Module, Design
Module, or a LiveLink product for a CAD package, a license for the File Import for
CATIA V5 module.

Note 4: Support for the NX™ file format is available only on supported Windows® and
Linux operating systems.

156 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


Note 5: Embedded parts in assemblies are not supported. To import such an assembly,
first convert the embedded parts to external parts.

The imported geometry objects are represented using the Parasolid geometry kernel,
which is the geometry kernel utilized by the CAD Import Module and the LiveLink
products for CAD software.

The method

[Link](gname).feature(<ftag>).importData()

imports the file again, even if the feature is built.

The import can generate object, boundary, edge, and point selections based on
material, layer, and color assignments in the 3D CAD file. The following properties are
available for working these selections:
TABLE 3-45: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selcadshownamesfromfileobj boolean false Show the object selection


names from the file in the
GUI.
selcadnameobj String[] Empty Names of object
selections in 3D CAD
import.
selcadnameinfileobj String[] Empty Original names of object
selections in 3D CAD
import. Read-only.
selcadkeepobj on | off Empty Keep object selections in
3D CAD import.
selcadshowobj on | off Empty Show object selections in
3D CAD import in
physics, materials, and so
on; in part instances; or in
3D from a plane
geometry.
selcadcontributetoobj String[] Empty Tags of cumulative
selection to contribute to
(or none to not
contribute), for object
selections in 3D CAD
import.

COMMANDS IN ALPHABETICAL ORDER | 157


TABLE 3-45: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selcadtagobj String[] Empty Tags of object selections


(read only, hidden in GUI)
in 3D CAD import.
selcadcolorobj String[] Empty Colors of object
selections (read only) in
3D CAD import. The
color is stored as a
comma-separated triple
of numbers between 0
and 1. It can also be none
(in which case it will be
displayed in yellow).
selindividualintable boolean false Show individual object
selections and, for the
knit case, individual
original object selections
in the CAD-tables.
selcadshownamesfromfilebnd boolean false Show the boundary
selection names from the
file in the GUI.
selcadnamebnd String[] Empty Names of boundary
selections in 3D CAD
import.
selcadnameinfilebnd String[] Empty Original names of
boundary selections in
3D CAD import. Read
only.
selcadkeepbnd on | off Empty Keep boundary selections
in 3D CAD import.
selcadshowbnd on | off Empty Show boundary
selections in 3D CAD
import in physics,
materials, and so on; in
part instances; or in 3D
from a plane geometry.

158 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


TABLE 3-45: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selcadcontributetobnd String[] Empty Tags of cumulative


selection to contribute to
(or none to not
contribute), for boundary
selections in 3D CAD
import.
selcadtagbnd String[] Empty Tags of boundary
selections (read-only,
hidden in GUI) in 3D
CAD import.
selcadcolorbnd String[] Empty Colors of boundary
selections (read only) in
3D CAD import. The
color is stored as a
comma-separated triple
of numbers between 0
and 1. It can also be none
(in which case it will be
displayed in yellow).
selcadshownamesfromfileedg boolean false Show the edge selection
names from the file in the
GUI.
selcadnameedg String[] Empty Names of edge selections
in 3D CAD import.
selcadnameinfileedg String[] Empty Original names of edge
selections in 3D CAD
import. Read only.
selcadkeepedg on | off Empty Keep edge selections in
3D CAD import.
selcadshowedg on | off Empty Show edge selections in
3D CAD import in
physics, materials, and so
on; in part instances; or in
3D from a plane
geometry.

COMMANDS IN ALPHABETICAL ORDER | 159


TABLE 3-45: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selcadcontributetoedg String[] Empty Tags of cumulative


selection to contribute to
(or none to not
contribute), for edge
selections in 3D CAD
import.
selcadtagedg String[] Empty Tags of edge selections
(read only, hidden in GUI)
in 3D CAD import.
selcadcoloredg String[] Empty Colors of edge selections
(read only) in 3D CAD
import. The color is
stored as a
comma-separated triple
of numbers between 0
and 1. It can also be none
(in which case it will be
displayed in yellow).
selcadshownamesfromfilepnt boolean false Show the point selection
names from the file in the
GUI.
selcadnamepnt String[] Empty Names of point selections
in 3D CAD import.
selcadnameinfilepnt String[] Empty Original names of point
selections in 3D CAD
import. Read only.
selcadkeeppnt on | off Empty Keep point selections in
3D CAD import.
selcadshowpnt on | off Empty Show point selections in
3D CAD import in
physics, materials, and so
on; in part instances; or in
3D from a plane
geometry.
selcadcontributetopnt String[] Empty Tags of cumulative
selection to contribute to
(or none to not
contribute), for point
selections in 3D CAD
import.

160 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


TABLE 3-45: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selcadtagpnt String[] Empty Tags of point selections


(read only, hidden in GUI)
in 3D CAD import.
selcadcolorpnt String[] Empty Colors of point selections
(read only) in 3D CAD
import. The color is
stored as a
comma-separated triple
of numbers between 0
and 1. It can also be none
(in which case it will be
displayed in yellow).
The following attributes are available:
TABLE 3-46: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off off Designate the resulting objects as construction


geometry.

COMPATIBILITY
The following property is no longer supported:
TABLE 3-47: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

coercion solid | face | solid Alias for knit. face is equivalent


off to surface.

SEE ALSO
Export, ExportFinal

COMMANDS IN ALPHABETICAL ORDER | 161


InterpolationCurve
The following additional properties are available with the Design Module.
TABLE 3-48: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

tableconstr String[] {} Constrain the interpolation points.


Constrained properties cannot be
modified by constraint and
dimension functions.
starttangconstr String[2] {off, off} Constrain the start tangent.
Constrained properties cannot be
modified by constraint and
dimension functions.
endtangconstr String[2] {off, off} Constrain the end tangent.
Constrained properties cannot be
modified by constraint and
dimension functions.

Knit
Knit surface CAD objects to form solids or surface objects.

SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Knit");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property)
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

162 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


DESCRIPTION
[Link](<ctag>).geom(<ftag>).feature().
create(<ftag>,"Knit") creates a knit feature tagged <ftag>. The following
properties are available.
TABLE 3-49: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

fillholes on | off off Attempt to generate new faces


to replace missing geometry
input Selection Names of input surface objects.
repairtol double 1e-5 Absolute repair tolerance.
selresult on | off off Create selections of all resulting
objects.
selresultshow all | obj | dom | dom Show selections of resulting
bnd | edg | pnt | objects in physics, materials, and
off so on, or in part instances. obj is
not available in a component’s
geometry. dom, bnd, and edg are
not available in all features.
contributeto String none Tag of cumulative selection to
contribute to.

This function also removes gaps and spikes that are within the absolute tolerance
specified in the property repairtol.

The following attributes are available:


TABLE 3-50: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

COMPATIBILITY
The following property is no longer supported:
TABLE 3-51: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables.


ptx

COMMANDS IN ALPHABETICAL ORDER | 163


EXAMPLE
The following example imports the file repair_demo_2.x_b, and knits the surface
objects into a solid. A gap is also removed during the operation.

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename","repair_demo_2.x_b");
[Link]("comp1").geom("geom1").runAll();
[Link]("comp1").geom("geom1").feature().
create("knit1","Knit");
[Link]("comp1").geom("geom1").feature("knit1").
selection("input").set("imp1");
[Link]("comp1").geom("geom1").feature("knit1").
set("repairtol",1e-3);
[Link]("comp1").geom("geom1").runAll();

SEE ALSO
Repair

LineSegment
The following additional properties are available with the Design Module.
TABLE 3-52: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

coord1constr String[2] {off, off} Constrain the coordinates of the


starting point. Constrained properties
cannot be modified by constraint and
dimension functions.
coord2constr String[2] {off, off} Constrain the coordinates of the
endpoint. Constrained properties
cannot be modified by constraint and
dimension functions.

Loft
Create a lofted surface through a set of profile curves.

164 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Loft");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Loft")

creates a Loft feature.

Use [Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("profile") to select loft profiles that are not specified as start or end
profiles. The default selection is empty.

Use [Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("startprofile") to select the loft start profile. The default selection is
empty.

Use [Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("endprofile") to select the loft start profile. The default selection is
empty.

Use [Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("guide") to select guide curves that are not specified as start or end guide
curves. The default selection is empty.

Use [Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("startguide") to select the start guide curve. The default selection is
empty.

COMMANDS IN ALPHABETICAL ORDER | 165


Use [Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("endguide") to select the end guide curve. The default selection is
empty.
TABLE 3-53: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

periodic on | off off Periodic loft.


unite on | off on Unite with input objects.
crossfaces on | off off Keep intermediate profile
faces.
type solid | surface solid Object type.
facepartioning minimal | minimal Face partitioning.
columns | grid
removeredundant on | off off Remove vertices that
separate edges with
identical curves before the
loft.
profile Selection Profiles.
startprofile Selection Start profile selection.
startprofiledir notprescribed | notpresc Loft direction.
parallel | ribed
perpendicular |
atangle
startprofilerel profilefaces | adjacent Relative to.
adjacent |
profileedges
startprofileangle double 0 Angle.
endprofile Selection End profile selection.
endprofiledir notprescribed | notpresc Loft direction.
parallel | ribed
perpendicular |
atangle
endprofilerel profilefaces | adjacent Relative to.
adjacent |
profileedges
endprofileangle double 0 Angle.
guide Selection Guide curves.
startguide Selection Start guide curve.
startguidedir notprescribed | notpresc Loft surface direction.
parallel ribed

166 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


TABLE 3-53: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

endguide Selection Start guide curve.


endguidedir notprescribed | notpresc Loft surface direction.
parallel ribed
selresult on | off off Create selections of all
resulting objects.
selresultshow all | obj | dom | dom Show selections of
bnd | edg | pnt | resulting objects in
off physics, materials, and so
on, or in part instances.
obj is not available in a
component’s geometry.
dom, bnd, and edg are not
available in all features.
propagatesel on | off on Propagate selections from
input objects to resulting
objects.
contributeto String none Tag of cumulative selection
to contribute to.
For information about the createselection and contributeto properties, search
the online help in COMSOL Multiphysics to locate and search the documentation.

The following attributes are available:


TABLE 3-54: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

EXAMPLE
Create a cylinder from two disc profiles. This illustrates two different ways of specifying
the profile.

Model model = [Link]("Model1");


[Link]().create("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").geomRep("cadps");
[Link]("comp1").geom("geom1").feature().
create("wp1", "WorkPlane");

COMMANDS IN ALPHABETICAL ORDER | 167


[Link]("comp1").geom("geom1").feature("wp1").geom().
create("c1", "Circle");
[Link]("comp1").geom("geom1").create("copy1", "Copy");
[Link]("comp1").geom("geom1").feature("copy1").
selection("input").set(new String[]{"wp1"});
[Link]("comp1").geom("geom1").feature("copy1").
set("displz", "1");
[Link]("comp1").geom("geom1").create("loft1", "Loft");
[Link]("comp1").geom("geom1").feature("loft1").
selection("profile").set(new String[]{"wp1"});
[Link]("comp1").geom("geom1").feature("loft1").
selection("startprofile").init(1);
[Link]("comp1").geom("geom1").feature("loft1").
selection("startprofile").
set("copy1", new int[]{1, 2, 3, 4});
[Link]("comp1").geom("geom1").run();

Midsurface
Generate a surface object that is the midsurface of a solid object in 3D.

SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Midsurface");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Midsurface")

creates a Midsurface feature.

Use

[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("input")

168 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


to select the objects for the midsurface operation. The default selection is empty.
TABLE 3-55: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

repair on | off on Repair overlaps


split on | off off Split in smooth components
createselection on | off off Create selections
contributeto String none Cumulative selection to contribute to

For information about the createselection and contributeto properties, search


the online help in COMSOL Multiphysics to locate and search all the documentation.

The following attributes are available:


TABLE 3-56: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

EXAMPLE
Generate the midsurface of a thin block:

Model model = [Link]("Model1");


[Link]().create("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").geomRep("cadps");
[Link]("comp1").geom("geom1").create("blk1", "Block");
[Link]("comp1").geom("geom1").feature("blk1").
set("size", new String[]{"1", "1", "0.1"});
[Link]("comp1").geom("geom1").
create("mid1", "Midsurface");
[Link]("comp1").geom("geom1").feature("mid1").
selection("input").set(new String[]{"blk1"});
[Link]("comp1").geom("geom1").run();

SEE ALSO
Thicken

COMMANDS IN ALPHABETICAL ORDER | 169


Mirror
The following additional properties are available with the Design Module.
TABLE 3-57: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

posconstr String[2] {on, on} Constrain point on line of reflection.


Constrained properties cannot be
modified by constraint and dimension
functions.
axisconstr String[2] {on, on} Constrain normal vector to line of
reflection. Constrained properties
cannot be modified by constraint and
dimension functions.

Move
The following additional properties are available with the Design Module.
TABLE 3-58: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

displxconstr on | off on Constrain the x-displacement.


Constrained properties cannot be
modified by constraint and dimension
functions.
displyconstr on | off on Constrain the y-displacement.
Constrained properties cannot be
modified by constraint and dimension
functions.

OffsetFaces

PURPOSE
Offset faces of 3D objects in the normal direction.

170 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"OffsetFaces");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property)
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"OffsetFaces")

creates an offset faces feature tagged <ftag>. The following properties are available.
TABLE 3-59: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

face Selection Empty Faces to offset


keep on | off off Keep input objects
subtractinput on | off off Offset the faces, and from the
resulting object subtract the
corresponding input object
distance double 0 Offset distance
reverse on | off off Reverse offset direction
fillet on | off off Fillet convex edges
stepfaces contang | no contang Create step faces
exceptendface on | off off Except if faces at ends of edge can
smerged be merged. Only used when
stepfaces is contang
perpstepedges on | off off Create perpendicular step edges
for surface objects
overflow auto | auto Overflow handling
extendoffset |
extendother |
capfaces |
error
selresult on | off off Create selections of all resulting
objects

COMMANDS IN ALPHABETICAL ORDER | 171


TABLE 3-59: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selresultshow all | obj | dom | dom Show selections, if selresult is


bnd | edg | pnt | on, of resulting objects in physics,
off materials, and so on, or in part
instances. obj is not available in a
component’s geometry
color none | custom | none The color of the selection, either
integerbetween given as an integer indicating a
1 and the number color in the color theme, or as a
of colors in the custom color in the customcolor
current theme
property. Coloring is only
available when selresult in active
customcolor RGB-triplet Next The color to use. Active when
available color is set to custom
theme
color
contributeto String none Tag of cumulative selection to
contribute to
propagatesel on | off on Propagate selections from input
objects to resulting objects.
The following attributes are available:
TABLE 3-60: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

SEE ALSO
TransformFaces

Parallel

PURPOSE
Constrains straight edges to be parallel.

172 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


DESCRIPTION

TABLE 3-61: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge Selection Straight edges


symboledg Selection Edge the symbol in the Graphics window
is attached to
symboledgpar double 0.5 Normalized edge parameter for
positioning the symbol
symboledgdispl double 20 Symbol displacement in left normal
direction from edge (in pixels)

SEE ALSO
Angle

Perpendicular

PURPOSE
Constrains two straight edges to be orthogonal.

DESCRIPTION

TABLE 3-62: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

entity1 Selection First edge


entity2 Selection Second edge
symbolentity 1|2 1 Edge the symbol in the Graphics window
is attached to
symboledgpar double 0 Normalized edge parameter for
positioning the symbol
symboledgdispl double 20 Symbol displacement in left normal
direction from edge (in pixels)

SEE ALSO
Angle

COMMANDS IN ALPHABETICAL ORDER | 173


Point
The following additional properties are available with the Design Module.
TABLE 3-63: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

pconstr String[2] {off, off} Constrain the coordinates. Constrained


properties cannot be modified by
constraint and dimension functions.

Polygon
The following additional properties are available with the Design Module.
TABLE 3-64: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

tableconstr String[] {} Constrain the polygon points.


Constrained properties cannot be
modified by constraint and dimension
functions.

Position

PURPOSE
Constrain a vertex to have given coordinates.

174 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


DESCRIPTION

TABLE 3-65: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

vertex Selection Vertex to fix


pos double[2] {0, 0} Coordinates
posconstr String[] {"on","on"} Determine whether the
dimension is a constraining
dimension (on) or measuring
dimension (off)
createpar on | off off Generate parameter from
dimension
parname String {"",""} Specify parameter name if
createpar is on
symbolvtxdispl double[2] {20, 20} Displacement of the symbol in
the Graphics window from the
vertex (in pixels)

Projection

PURPOSE
Project 3D objects and entities to a 2D work plane.

SYNTAX
[Link](<ctag>).geom(<tag>).feature(<wptag>).
geom().create(<ftag>,"Projection");
[Link](<ctag>).geom(<tag>).feature(<wptag>).
geom().feature(<ftag>).selection("input");
[Link](<ctag>).geom(<tag>).feature(<wptag>).
geom().feature(<ftag>).set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<wptag>).
geom().feature(<ftag>).getType(property)
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
Use

[Link](<ctag>).geom(<tag>).feature(<wptag>).geom().
create(<ftag>,"Projection")

COMMANDS IN ALPHABETICAL ORDER | 175


to create a projection feature tagged <ftag> in the 2D sequence of the work plane
feature <wptag>. It can compute the projection of 3D objects and entities to the work
plane.

By default, you get the projection for all 3D objects that were generated by the features
preceding the work plane feature. To select a subset of these objects or to select
entities, set the project property to the appropriate entity level, and use the property
input to select the 3D objects or entities.

The following properties are available.


TABLE 3-66: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

absrepairtool ...geom(<tag>). Absolute repair tolerance.


absRepairTol()
input Selection Entities to project. Used
when project is not all.
project all | obj | all Project all objects or selected
dom | bnd | objects or entities
edg | vtx
projectiontyp edgvtx | outline Projection type. Used when
e outline | project is all, dom, or bnd.
all
repairtol double ...geom(<tag>). Relative repair tolerance,
repairTol() relative to size of each input
object.
repairtoltype auto | ...geom(<tag>). Repair tolerance type:
relative | repairTolType() automatic, relative, or
absolute absolute.
workplane String Work plane to project onto.
selresult on | off off Create selections of all
resulting objects.
selresultshow all | obj | bnd Show selections, if selresult is
bnd | pnt | on, in physics, materials, and
off so on; or in 3D from a plane
geometry. obj is not available
in a component’s geometry.
contributeto String none Tag of cumulative selection to
contribute to.

176 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


The following attributes are available:
TABLE 3-67: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

SEE ALSO
CrossSection, WorkPlane

QuadraticBezier
The following additional properties are available with the Design Module.
TABLE 3-68: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

pconstr String[3] {off, off, Constrain the control points.


off} Constrained properties cannot be
modified by constraint and dimension
functions.

Radius

PURPOSE
Constrain a circular edge to have a given radius.

COMMANDS IN ALPHABETICAL ORDER | 177


DESCRIPTION

TABLE 3-69: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge Selection Circular edge


radius double 0 Radius
radiusconstr on | off on Determine whether the dimension is a
constraining dimension (on) or measuring
dimension (off)
createpar on | off off Generate parameter from dimension
parname String "" Specify parameter name if createpar is
on
arrowangdispl double 0 Angular displacement of arrow symbol
relative to middle of edge
labelradius double 0.5 Relative label position along arrow symbol

SEE ALSO
EqualRadius

Rectangle
The following additional properties are available with the Design Module.
TABLE 3-70: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

sizeconstr String[2] {off, off} Constrain the width and the height.
Constrained properties cannot be
modified by constraint and dimension
functions.
posconstr String[2] {off, off} Constrain the position. Constrained
properties cannot be modified by
constraint and dimension functions.
rotconstr on | off off Constrain the rotation angle.
Constrained properties cannot be
modified by constraint and dimension
functions.
arrowdispl double[2] Empty Displacement of arrow symbols in the
normal direction.

178 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


TABLE 3-70: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

labelpos double[2] {0.5, 0.5} Relative label position along arrow


symbols.
arrowint String[2] {on, on} Internal or external arrow symbols.

Repair
Repair CAD objects.

SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Repair");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property)
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Repair")

creates a repair feature tagged <ftag>. The following properties are available.
TABLE 3-71: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection Names of input objects.


check on | off on Check the input objects for
errors.
repairtol double 1e-5 Absolute repair tolerance
selresult on | off off Create selections of all resulting
objects.

COMMANDS IN ALPHABETICAL ORDER | 179


TABLE 3-71: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selresultshow all | obj | dom Show selections of resulting


dom | bnd | objects in physics, materials, and
edg | pnt | so on, or in part instances. obj is
off not available in a component’s
geometry. dom, bnd, and edg are
not available in all features.
simplify on | off off Simplify the underlying curve and
surface manifolds of geometric
entities
repairfacetoface on | off off Repair face-to-face
inconsistencies in solid objects
contributeto String none Tag of cumulative selection to
contribute to.
The function tries to remove or repair the following defects:

• Entities with invalid sense


• Invalid edge and vertex tolerances
• Invalid manifolds
• Self-intersecting manifolds
• Non-G1 manifolds
• Missing edge or vertex manifolds
• Missing vertex
• Vertices not on curve of edge
• Edges and vertices not on surface of face
• Removal of surface self-intersections that lie outside the face
• Splitting at edge intersections which have no vertex
• Removal of discontinuities by either splitting or smoothing
• Remove small features (short edges, small faces, sliver faces, and spikes)

180 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


The following attributes are available:
TABLE 3-72: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

COMPATIBILITY
The following property is no longer supported:
TABLE 3-73: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables


ptx

EXAMPLE
The following example imports the file repair_demo_2.x_b, and repairs the resulting
objects.

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename", "repair_demo_2.x_b");
[Link]("comp1").geom("geom1").runAll();
[Link]("comp1").geom("geom1").feature().
create("rep1","Repair");
[Link]("comp1").geom("geom1").feature("rep1").
selection("input"). set("imp1");
[Link]("comp1").geom("geom1").feature("rep1").
set("repairtol",1e-3);
[Link]("comp1").geom("geom1").runAll();

SEE ALSO
Check, Knit

ReplaceFaces
Delete faces from CAD objects and heal the wounds by creating new faces.

COMMANDS IN ALPHABETICAL ORDER | 181


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"ReplaceFaces");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);

[Link](<ctag>).geom(<tag>).defeaturing("ReplaceFaces").
selection(property)
[Link](<ctag>).geom(<tag>).defeaturing("ReplaceFaces").
set(property,<value>);
[Link](<ctag>).geom(<tag>).defeaturing("ReplaceFaces").
delete(<ftag>);

DESCRIPTION
[Link](<ctag>).geom(<tag>).defeaturing("ReplaceFaces").
delete(<ftag>) creates a ReplaceFaces feature tagged <ftag> with the specified
properties. If the feature can be built, it is inserted in the geometry sequence after the
current feature; otherwise, the feature is discarded.

It is also possible to create a ReplaceFaces feature using the standard create


method.
TABLE 3-74: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection Faces to replace.


heal cap | extend extend Healing method.
throughhole on | off off Heal as if the removed faces are a
through hole.
selresult on | off off Create selections of all resulting
objects.
selresultshow all | obj | dom | dom Show selections of resulting
bnd | edg | pnt | objects in physics, materials, and
off so on, or in part instances. obj is
not available in a component’s
geometry. dom, bnd, and edg are
not available in all features.
contributeto String none Tag of cumulative selection to
contribute to.

182 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


The faces in the property input are deleted from their objects. The resulting object is
healed so that a solid object is obtained. If heal is cap, a new face is formed based on
the surrounding edges of each wound. If heal is extend, the surrounding faces of each
wound are grown or shrunk to heal the wound.

When you replacing faces that form through holes, set the throughhole property to
on to indicate that the two wounds from where the hole entered and exited the
geometry are to be healed independently instead of as a single wound. If throughhole
is off, the wound would be healed with a single new face that would just recreate the
hole.

EXAMPLE
The following example imports the file defeaturing_demo_2.mphbin, and removes
a hole from the geometry model.

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").feature().
create("imp1","Import");
[Link]("comp1").geom("geom1").feature("imp1").
set("filename","defeaturing_demo_2.mphbin");
[Link]("comp1").geom("geom1").run("imp1");
[Link]("comp1").geom("geom1").feature().
create("rfa1","ReplaceFaces");
[Link]("comp1").geom("geom1").feature("rfa1").
selection("input").set("imp1",6,7,8,9,11,12,13);
[Link]("comp1").geom("geom1").run();

COMPATIBILITY
The following property is no longer supported:
TABLE 3-75: OBSOLETE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

Out stx | ftx | ctx | none Output variables


ptx

SEE ALSO
DeleteFillets, DeleteSliverFaces, DeleteSmallFaces, DetachFaces

COMMANDS IN ALPHABETICAL ORDER | 183


Rotate
The following additional properties are available with the Design Module.
TABLE 3-76: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

rotconstr on | off on Constrain the rotation angle.


Constrained properties cannot be
modified by constraint and dimension
functions.
posconstr String[2] {on, on} Constrain the center of rotation.
Constrained properties cannot be
modified by constraint and dimension
functions.

Scale
The following additional properties are available with the Design Module.
TABLE 3-77: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

posconstr String[2] {on, on} Constrain the center of scaling.


Constrained properties cannot be
modified by constraint and dimension
functions.

Square
The following additional properties are available with the Design Module.
TABLE 3-78: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

sizeconstr on | off off Constrain the side length. Constrained


properties cannot be modified by
constraint and dimension functions.
posconstr String[2] {off, off} Constrain the position. Constrained
properties cannot be modified by
constraint and dimension functions.
rotconstr on | off off Constrain the rotation angle.
Constrained properties cannot be
modified by constraint and dimension
functions.

184 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


TABLE 3-78: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

arrowdispl double Empty Displacement of arrow symbol in the


normal direction.
labelpos double 0.5 Relative label position along arrow
symbol.
arrowint on | off on Internal or external arrow symbol.

TangentConstraint

PURPOSE
Constrain two edges to have a point of tangency. For each edge, you can require that
the tangency occurs at an adjacent vertex.

COMMANDS IN ALPHABETICAL ORDER | 185


DESCRIPTION

TABLE 3-79: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge1 Selection First edge


point1 vertex | anywhere Point of tangency for first edge
anywhere
vertex1 Selection Vertex for point of tangency (used
when point1 is vertex)
edge2 Selection Second edge
point2 vertex | anywhere Point of tangency for second edge
anywhere
vertex2 Selection Vertex for point of tangency (used
when point2 is vertex)
helppoint1 double[2] {0, 0} First help point (used when point1
is anywhere)
helppoint2 double[2] {0, 0} Second help point (used when
point1 is anywhere)
symbolentity 1|2 1 Edge the symbol in the Graphics
window is attached to
symboledgpar double 0 Normalized edge parameter for
positioning the symbol
symboledgdispl double 20 Symbol displacement in left normal
direction from edge (in pixels)

SEE ALSO
Angle

Thicken
Generate a solid object by thickening in the normal direction a surface object in 3D.

186 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Thicken");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"Thicken")

creates a Thicken feature.

Use [Link](<ctag>).geom(<tag>).feature(<ftag>).
selection("input") to select the objects for the thicken operation. The default
selection is empty.
TABLE 3-80: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

input Selection Input objects


offset symmetric | symmetr Type of offset specification
asymmetric ic
totalthick double 0 Total thickness (for symmetric
offset)
upthick double 0 Upside thickness (for asymmetric
offset)
downthick double 0 Downside thickness (for
asymmetric offset)
direction normal | normal Direction of the side faces
vector
dirvector double[3] {0,0,1} Direction vector for side faces
fillet on | off off Fillet offset edges
selresult on | off off Create selections of all resulting
objects.

COMMANDS IN ALPHABETICAL ORDER | 187


TABLE 3-80: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

selresultshow all | obj | dom Show selections of resulting


dom | bnd | objects in physics, materials, and so
edg | pnt | on, or in part instances. obj is not
off available in a component’s
geometry. dom, bnd, and edg are
not available in all features.
contributeto String none Tag of cumulative selection to
contribute to.
propagatesel on | off on Propagate selections from input
objects to resulting objects.
For information about the createselection and contributeto properties, search
the online help in COMSOL Multiphysics to locate and search all the documentation.

The following attributes are available:


TABLE 3-81: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

EXAMPLE
Create a cylinder by thickening a disc shaped surface:

Model model = [Link]("Model1");


[Link]("comp1");
[Link]("comp1").geom().create("geom1",3);
[Link]("comp1").geom("geom1").geomRep("cadps");
[Link]("comp1").geom("geom1").feature().
create("wp1", "WorkPlane");
[Link]("comp1").geom("geom1").feature("wp1").geom().
create("c1", "Circle");
[Link]("comp1").geom("geom1").create("thi1", "Thicken");
[Link]("comp1").geom("geom1").feature("thi1").
selection("input").set(new String[]{"wp1"});
[Link]("comp1").geom("geom1").feature("thi1").
set("totalthick", "0.1");
[Link]("comp1").geom("geom1").feature("thi1").
set("direction", "vector");
[Link]("comp1").geom("geom1").feature("thi1").
set("dirvector", new String[]{"1", "0", "1"});
[Link]("comp1").geom("geom1").run();

188 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


SEE ALSO
Midsurface

TotalEdgeLength

PURPOSE
Constrain a set of edges to have a given total length. The edges must form a chain and
all lie on the same line, circle, or spline.

DESCRIPTION

TABLE 3-82: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge Selection Edges


length double 0 Total length of edges
lengthconstr on | off on Determine whether the
dimension is a constraining
dimension (on) or measuring
dimension (off)
createpar on | off off Generate parameter from
dimension
parname String "" Specify parameter name if
createpar is on
labeldispl double Empty Displacement of the label in
the Graphics window in left
normal direction
labelpos double 0.5 Relative position of the label
in the Graphics window along
edges

SEE ALSO
Distance

TransformFaces

PURPOSE
Apply a linear transform (consisting of displacement, rotation, and isotropic scaling) to
faces of 3D objects.

COMMANDS IN ALPHABETICAL ORDER | 189


SYNTAX
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"TransformFaces");
[Link](<ctag>).geom(<tag>).feature(<ftag>).
selection(property);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
set(property,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getType(property)
[Link](<ctag>).geom(<tag>).feature(<ftag>).
setAttribute(attribute,<value>);
[Link](<ctag>).geom(<tag>).feature(<ftag>).
getAttribute(attribute);

DESCRIPTION
[Link](<ctag>).geom(<tag>).feature().
create(<ftag>,"TransformFaces")

creates a transform faces feature tagged <ftag>. The following properties are available.
TABLE 3-83: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

face Selection Empty Faces to transform


keep on | off off Keep input objects
workplanesrc this | Part this Part Instance feature to take the
Instance feature work plane from
tag
workplane xyplane | work xyplane Work Plane feature that defines
plane feature tag the coordinate system. The
default, xyplane, is the global
Cartesian coordinate system
center double[3] {0,0,0} Point on the axis of rotation, and
the center point of scaling
displ double[3] {0,0,0} Displacement
specify axis | eulerang axis Specify an axis of rotation, Euler
| edge angles (Z-X-Z), or a straight edge
axistype x|y|z| z Coordinate system used for axis.
cartesian | Used if specify is set to axis
spherical
ax3 double[3] {0,0,1} Axis vector, used if axistype is
cartesian
ax2 double[2] {0,0} Spherical angles theta and phi,
used if axistype is spherical

190 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


TABLE 3-83: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

axis double {0,0,1} Rotation axis. Vector has length 3


if axistype is cartesian, and
length 2 if axistype is
spherical. Alias for ax2 and
ax3
eulerang double[3] {0,0,0} Intrinsic Z-X-Z Euler angles α, β,
and γ, used if specify is set to
eulerang
edge Selection Edge selection. Used when
specify is set to edge
rot double 0 Rotation angle. Used if specify
is set to axis or edge
factor double 1 Scale factor
stepfaces yes | contang | contang Create step faces
no
mergestepfaces on | off off Merge step faces with adjacent
face. Only used when
stepfaces is yes
exceptendfaces on | off off Except if faces at ends of edge can
merged be merged. Only used when
stepfaces is contang
perpstepedges on | off off Create perpendicular step edges
for surface objects
overflow auto | auto Overflow handling
extendtransfo
rmed |
extendother |
capfaces |
error
selresult on | off off Create selections of all resulting
objects
selresultshow all | obj | dom | dom Show selections, if selresult is
bnd | edg | pnt | on, of resulting objects in physics,
off materials, and so on, or in part
instances. obj is not available in a
component’s geometry

COMMANDS IN ALPHABETICAL ORDER | 191


TABLE 3-83: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

color none | custom | none The color of the selection, either


integer between given as an integer indicating a
1 and the number color in the color theme, or as a
of colors in the custom color in the
current theme
customcolor property.
Coloring is only available when
selresult is active
customcolor RGB-triplet Next The color to use. Active when
available color is set to custom
theme
color
contributeto String none Tag of cumulative selection to
contribute to
propagatesel on | off on Propagate selections from input
objects to resulting objects.
The following attributes are available:
TABLE 3-84: VALID ATTRIBUTES

NAME VALUE DEFAULT DESCRIPTION

construction on | off | inherit Designate the resulting objects as


inherit construction geometry. Use inherit to set
the construction geometry attribute only if
all input objects are construction geometry.

SEE ALSO
OffsetFaces

Vertical

PURPOSE
Constrains straight edges to be parallel to the y-axis.

192 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


DESCRIPTION

TABLE 3-85: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

edge Selection Straight edges


symboledg Selection Edge the symbol in the Graphics window
is attached to
symboledgpar double 0.5 Normalized edge parameter for
positioning the symbol
symboledgdispl double 20 Symbol displacement in left normal
direction from edge (in pixels)

SEE ALSO
Angle, Horizontal, Parallel

XDistance

PURPOSE
Constrain the distance in the x direction between two geometric entities to a given
value.

COMMANDS IN ALPHABETICAL ORDER | 193


DESCRIPTION

TABLE 3-86: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

entity1 Selection First entity (vertex or curved edge)


entity2 Selection Second entity (vertex or curved edge)
distance double 0 Distance
distanceconstr on | off on Determine whether the dimension is a
constraining dimension (on) or
measuring dimension (off)
createpar on | off off Generate parameter from dimension
parname String "" Specify parameter name if createpar is
on
helppoint1 double[2] {0, 0} First help point
helppoint2 double[2] {0, 0} Second help point
arrowdispl double Empty Displacement of arrow symbol in the
Graphics window in the normal
direction
labelpos double 0.5 Relative label position along arrow
symbol
arrowint on | off on Internal or external arrow symbol

SEE ALSO
YDistance, DirectedDistance, Distance

YDistance

PURPOSE
Constrain the distance in the y direction between two geometric entities to a given
value.

194 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


DESCRIPTION

TABLE 3-87: AVAILABLE PROPERTIES.

PROPERTY VALUE DEFAULT DESCRIPTION

entity1 Selection First entity (vertex or curved edge)


entity2 Selection Second entity (vertex or curved edge)
distance double 0 Distance
distanceconstr on | off on Determine whether the dimension is a
constraining dimension (on) or
measuring dimension (off)
createpar on | off off Generate parameter from dimension
parname String "" Specify parameter name if createpar
is on
helppoint1 double[2] {0, 0} First help point
helppoint2 double[2] {0, 0} Second help point
arrowdispl double Empty Displacement of arrow symbol in the
Graphics window in the normal
direction
labelpos double 0.5 Relative label position along arrow
symbol
arrowint on | off on Internal or external arrow symbol

SEE ALSO
XDistance, DirectedDistance, Distance

COMMANDS IN ALPHABETICAL ORDER | 195


196 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE
I n d e x
A Application Libraries window 17

C cap faces 75
chamfer (node) 77

D defeaturing tools 102


documentation 15

E emailing COMSOL 17
export (of geometries) 52

F fillet (node) 78
filling holes 75

G geometry
exporting to file 52

I internet resources 15

K knowledge base, COMSOL 18

L loft (node) 82

M MPH-files 17

T technical support, COMSOL 17

W websites, COMSOL 18

INDEX| 197
198 | I N D E X

You might also like