Documente Academic
Documente Profesional
Documente Cultură
Software
By
Master of Technology
in
Mechanical Engineering (CAD-CAM)
By
15MMCC12
i
Undertaking
I, Mayank Kumar Jain, Roll. No. 15MMCC12, give undertaking that the Major Project
entitled “Improvement in Trim Curve Feature of NX CAD software” submitted by me, towards
the partial fulfillment of the requirements for the degree of Master of Technology in Mechanical
Engineering (CAD-CAM) of Nirma University, Ahmedabad, is the original work carried out by
me and I give assurance that no attempt of plagiarism has been made. I understand that in the
event of any similarity found subsequently with any published work or any dissertation work
elsewhere; it will result in severe disciplinary action.
Signature of student
Date
Place : Nirma University, Ahmedabad
Endorsed by
(Signature of Guide)
ii
Certificate
This is to certify that the Major Project Report entitled “Improvement in Trim Curve Fea-
ture of NX CAD software” submitted by Mr. Mayank Kumar Jain (15MMCC12), towards the
partial fulfillment of the requirements for the award of Degree of Master of Technology in Me-
chanical Engineering (CAD-CAM) of Institute of Technology, Nirma University, Ahmadabad
is the record of work carried out by him under our supervision and guidance. In our opinion,
the submitted work has reached a level required for being accepted for examination.The result
embodied in this major project, to the best of our knowledge, has not been submitted to any
other University or Institution for award of any degree.
iii
Acknowledgment
I would like to express my sincere gratitude to those who have always helped me throughout
this project work.
First of all, I would like to thank my project guide Prof. D.J. Shah (Assistant professor,
Mechanical Engineering Department, Institute of Technology, Nirma University) who helps me
to understand the problem definition, stimulating suggestions and encouragement. I am sincerely
thankful for this valuable guidance and help to enhance my presentation skills.
I would like to thankful to my industry guide Mr. Nilesh Rajhans (Team leader, Smart model
construction, Siemens industries Software PVT. LTD. (R & D), Pune). I am obliged to them for
providing me with an opportunity to work under him. In spite of having busy schedule, he was
always ready to help me, whenever required. I am grateful for patience and interest they shown
from me.
I am also thankful to Mr. Avick chakroborty, General Manager and site leader (Siemens
Industries Software (R & D) Pune) for giving me chance to work in Siemens R & D.
I also want to thank Mr. Prasad joshi(director, Flexur system, Pune) to give the knowledge
about vectors and geometric concepts.
Atlas I’m thankful to all my colleague in my office, who constantly helping me out at my
work and for clearing each and every of my doubt.
I am very much thankful to my entire colleague, friends, who is directly or indirectly asso-
ciated with my endeavor.
15MMCC12
iv
Abstract
In the modern world of precision and automation. modeling, analysis and simulation are
Key technique to achieve desired result in an optimized way. In current market we have to keep
on improving in all respect and follow the day to day market trends and requirement. we have
to exile in all type of new requirement and has to be robust in working.
The aim of the present work is to modify the existing trim curve feature, which is one of the
basic feature in NX CAD software and to apply the robustness in feature. This can be done with
the help of preparing different classes like “Smart Property” class, User Interface, Automation
APIs etc. For this a complex multilevel module wise coding is done in C++ and some other
languages.
Modification in trim curve feature in NX CAD, Which include modification in input type and
method and internal working of the core structure. This can be accomplish be introducing class
of user interface and new smart property class which decrease repetition of work and impart
robustness, Smart property class also helps in data storage and better functionality. All these
modification are done in all level including UI, Automation, Journamation, NX-Open, and core.
This modified feature is tested and validated rigorously and results of which are quite satis-
factory. This modification is now implemented in latest version of NX CAD (NX1101.11) and
the Smart Property class is tested and validated, and going to be implemented in next version of
NX1102.10.
Key Words: NX, Trim Curve, CAD, C++, UI, NX-Open, Automation, Journamation.
v
Contents
Declaration i
Undertaking ii
Certificate iii
Acknowledgment iv
Abstract v
Abbreviation x
1 Introduction 1
1.1 Overview of project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Project Definition[27] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Old Trim Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 What to do in terms of coding . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.7 Outline of the report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Literature Review 7
2.1 Research paper reviewed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 NX CAD System 10
3.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Basic Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 Common Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4 Solid Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.5 Block based UI(User Interface) approach[22] . . . . . . . . . . . . . . . . . . 17
4 Project Design 20
4.1 Design Objective[27] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2 Network Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
vi
5 Smart Property Class 23
5.1 UML class diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2 UI of Smart Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3 Builder class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.4 Automation API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.5 Parameterise Class of SP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.6 Multiplicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.7 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.8 User Abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6 Trim Curve 31
6.1 UI of new trim curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.2 Builder of trim curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.3 Automation API for trim curve[26] . . . . . . . . . . . . . . . . . . . . . . . . 40
vii
List of Figures
7.1 Debugging[29] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.2 overview figure 1[28] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.3 overview figure 2[28] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.4 overview figure 3[28] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.5 overview figure 4[28] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.6 overview figure 5[28] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.7 overview figure 6[28] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
viii
List of Tables
ix
Abbreviation
API Application Programming Interface
B-rep Boundary Representation
CAD Computer Aided Design
CMOD Core Modeling
CSG Constructive Solid Geometry
CSYS Co-ordinate System
DLL Dynamic Link Library
FREC Feature Record
GUI Graphics User Interface
GWIF Graphical Windows Interface
JA Journamation
KID Kernel Interface Driver
MB3 Mouse Button 3 (Right Click of a mouse)
MLS Moving Least Squares
NC Numerical Control
NURBS Non-Uniform Rational B-Spline
OM Object Manager
OpenGL Open Graphics Library
PK Parasolid Kernel System
PN Part Navigator
SC Smart Collector
SI Selection Intent
SNC Selective Nef Complexes
TTP Topology Transition Points
UI User Interface
UICOMP User Interface Component
UIFW User Interface Framework
UML Unified modeling language
WCS Work Co-ordinate System
x
Chapter 1
Introduction
SIEMENS industry software ltd. has acquired modeling software called Unigraphics and after
some years of development they started new software product called NX. NX is 3D modeling
software with many additional facilities; it supports Computer Aided Design (CAD), Computer
Aided Manufacturing (CAM) as well as CAE.
NX is a Solid and Surface modeling software which supports parametric equation at background.
NX uses a graphics engine generally called kernels in CAD industries named as Parasolid. NX is
one of the most used software in Car manufacturing, Aerospace and other mechanical industries.
It is frequently used by most ship building companies.
It must be possible to select multiple connected string to trim curve in a single operation.
1
• Allows selection of Face Sets using Selection Intent for Bounding Objects
It must be possible to select faces (using face selection intent) as bounding object to the
trim operation.
It must be possible to select the number and type of bounding object to be more than one
in single operation.
There should be a new class in core “Minimum 3D Distance” which find the minimum
distance with respect to another curve or face or plane and store those data and manage
them at background for trim curve.
• Make this function more optimize and robust against any types of input and errors.
2
Figure 1.1: UI of Old Trim Curve[28]
The old trim curve as in term of input can take one single curve as input, and that curve should
be single curve and not the continuous one. Same for the bounding objects there can only be
two bounding objects as an input parameter. Which can be either face or curve or both. This
function works well for 2D as well as for 3D, and can trim any curve.
3
Figure 1.2: Trim Curve Of NX11[28]
1.4 Motivation
Motivation behind this project is the customer demand. Trim curve is the most common function
used in any CAD system. So it should be more precise and better and able to do multitask at
once. Initially there was one input, so if user has to trim multiple curve, then he has to do it one
at a time, second the trim direction of non-intersecting curve is always straight. If we want to
trim at minimum distance with respect to another then there is no provision, and atlas it does’t
take multiple surfaces. So all this problem and demand lead to the advancement in trim curve
feature.
4
evaluation of all combination.
Now each bounding object has a relationship with each curve. And there is considerably increase
in the output. After this a new type of input to the bounding object is to be added which can
allow multiple face as input. The faces type can be single, tangent, adjacent, feature, body or
region.
And finally there has to make the shortest 3D Distance option robust. In which it can handle
multiple solution and even the case of intersection or multiple intersection
1.6 Methodology
Following flow of tasks is followed while working on the project. To understand how NX, works
several classroom training were attended. There are some web training as well as recorded train-
ing are available in NX database. These training and study material was studied thoroughly for
the understanding purpose. After that some assignments were done to take hands on experi-
ence of feature development. Then study of customer expectations was done. After that actual
process of developing algorithm and writing code started.
5
1.7 Outline of the report
The flow of the report goes in following way. In the first chapter the introduction about trim
curve feature in NX. How it looks like now and how it is going to be update to a new graphics.
In second chapter a detailed literature review has been presented followed by chapter three is
the structure and working of the CAD software and its key terminology is presented. In chapter
four is the workflow is presented. Followed by chapter five and six is the description of actual
work and structure. In chapter seven consist of conclusion of the present work as well as the
future scope.
6
Chapter 2
Literature Review
This paper is on “Software component and the semantic Web: An in-depth content analysis and
integration history” which cover Component-based software engineering (CBSE) ( Cai et al.,
20 0 0 ) has been a transition from the conventional development process to promote software
development in an economical, effective and faster manner through the reuse and integration
of software pack- ages named as component or COTS (Commercial Off-The-Shelf). Ample
amount of research has been done on the various aspects, phases, and characteristics of the
CBSE process since its provenance in the industry.
This paper is written on “New Developments in Geometry – Theory and Applications”. It con-
tains several results related to bivariate splines and surfaces. The first paper in this group, au-
thored by Csima and Szirmai, is devoted to isoptic surfaces of polyhedron in three-dimensional
space. So far, most related results are limited to planar objects. In their paper, the authors de-
velop an algorithm to determine the isoptic surface of a polyhedron and apply it to the Platonic
7
solids and to some semi-regular Archimedean solids. Sangalli, Takacs and Vázquez investigate
unstructured spline spaces for isogeometric analysis based on spline manifolds. They generalize
the concept of dual-compatible B-splines, which has been developed for structured T-splines.
This paper is on “Efficient computation of dual space and directional multiplicity of an iso-
lated point” . Isolated singularities typically occur at self-intersection points of planar algebraic
curves, curve offsets, intersections between spatial curves and surfaces, and so on. The informa-
tion characterizing the singularity can be captured in a local dual basis, expressing combinations
of vanishing derivatives at the singular point. Macaulay’s algorithm is a classic algorithm for
computing such a basis, for a point in an algebraic set. The integration method of Mourrain
constructs much smaller matrices.
Component- based software engineering, The idea of developing software components was en-
visioned more than forty years ago. In the past two decades, Component-Based Software En-
gineering (CBSE) has emerged as a distinguishable approach in soft- ware engineering, and it
has attracted the attention of many researchers, which has led to many results being published
8
in the research literature. There is a huge amount of knowledge encapsulated in conferences
and journals targeting this area, but a systematic analysis of that knowledge is missing. For this
reason, we aim to investigate the state-of-the-art of the CBSE area through a detailed literature
review.
This paper describes the use of clickers in a Java programming course. However, instead of
using ordinary hardware clickers, we use software clickers, implemented in Java, that allow for
much richer problem types than the traditional multiple-choice question. The problem types we
introduce in this paper give students a much higher degree of freedom in solving a problem, and
thus more opportunities for making mistakes. We look at mistakes as learning opportunities, and
we introduce a pedagogical approach that allows students to learn from mistakes of their peers.
We finish with a case study and an evaluation of our approach based on the detailed analysis of
its use in two semesters of an undergraduate Java programming course.
This paper describes a proof outline logic that covers most typical object-oriented language con-
structs in the presence of inheritance and sub typing. The logic is based on a weakest precon-
dition calculus for assignments and object allocation which takes field shadowing into account.
Dynamically bound method calls are tackled with a variant ofHoare’ s rule of adaptation that
deals with the dynamic allocation of objects in object-oriented programs. The logic is based
on an assertion language that is closely tailored to the abstraction level of the programming
language.
Jaroslav Mackerle[8]
This paper gives a bibliographical review of the object-oriented programming applied to the fi-
nite element method as well as to the boundary element method. The bibliography at the end of
the paper contains references to papers, conference proceedings and theses/dissertations on the
subject that were published between 1990 and 2003. The following topics are included: finite
element method object-oriented programming philosophy, mesh modeling, distributed/parallel
processing, toolkit and libraries, object-oriented specific applications (aerospace, civil engineer-
ing/geomechanics, coupled problems, dynamical systems, electromagnetics, fracture mechanics
and contact problems, material simulations/manufacturing, mechanical engineering, nonlinear
structural simulations, optimization, others); boundary element method.
9
Chapter 3
NX CAD System
NX Modeling provides a solid modeling system to enable rapid conceptual design. You can
create and edit complex, realistic, solid models interactively. You can change and update solid
bodies by directly editing their dimensions or by using other construction techniques.
10
3.1 Basics
Sketch
Use the Sketcher to freehand a sketch, and dimension an "outline" of curves. You can then
sweep the sketch using Extrude or Revolved Body to create a solid or sheet body. You can later
render the sketch to precisely represent the object of interest by editing the dimensions and by
creating relationships between geometric objects. Editing a dimension of the sketch not only
modifies the geometry of the sketch, but also the body created from the sketch.
Associativity
Associativity is a term that is used to indicate geometric relationships between individual por-
tions of a model. These relationships are established as the designer uses various functions for
model creation. In an associative model, constraints and relationships are captured automatically
as the model is developed. For example, in an associative model, a through hole is associated
with the faces that the hole penetrates. If the model is later changed so that one or both of those
faces moves, the hole updates automatically due to its association with the faces.
Positioning a Feature
You can position a feature relative to the geometry on your model by using positioning dimen-
sions. The feature is then associated with that geometry and will maintain those associations
whenever you edit the model. You can also edit the position of the feature by changing the
values of the positioning dimensions.
11
Reference Feature
You can create reference features, such as Datum Planes, Datum Axes and Datum CSYS, which
you can use as reference geometry when needed, or as construction devices for other features.
Any feature created using a reference feature is associated to that reference feature and retains
that association during edits to the model. We can use a datum plane as a reference plane in
constructing sketches, creating features, and positioning features. You can use a datum axis to
create datum planes, to place items concentrically, or to create radial patterns.
Expressions
The Expressions tool lets you incorporate your requirements and design restrictions by defining
mathematical relationships between different parts of the design. For example, you can define
the height of a boss as three times its diameter, so that when the diameter changes, the height
changes also.
Boolean Operations Modeling provides the following Boolean operators: Unite, Sub-tract, and
Intersect. Unite combines bodies, for example, uniting two rectangular blocks to form a T-
shaped solid body. Subtract removes one body from another, for example, removing a cylinder
from a block to form a hole. Intersect creates a solid body from material shared by two solid
bodies. These operations can also be used with free form features called sheets.
Undo
You can return a design to a previous state any number of times using the Undo function. You do
not have to take a great deal of time making sure each operation is absolutely correct, because a
mistake can be easily undone. This freedom to easily change the model lets you cease worrying
about getting it wrong, and frees you to explore more possibilities to get it right.
Additional Capabilities
Other NX applications can operate directly on solid objects created within Modeling without
any translation of the solid body. For example, you can perform drafting, engineering analysis,
and NC machining functions by accessing the appropriate application. Using Modeling, you
can design a complete, unambiguous, three dimensional model to describe an object. You can
extract a wide range of physical properties from the solid bodies, including mass properties.
Shading and hidden line capabilities help you visualize complex assemblies. You can identify
interference automatically, eliminating the need to attempt to do so manually. Hidden edge
12
views can later be generated and placed on drawings. Fully associative dimension drawings can
be created from solid models using the appropriate options of the Drafting application. If the
solid model is edited later, the drawing and dimensions are updated automatically.
13
sweep or rotate these curves to create a complex portion of your design.
Finally, you can add form features, such as chamfers, holes, slots, or even user defined features
to complete the object.
Updating Model[22]
A model can be updated either automatically or manually. Automatic updates are performed
only on those features accepted by an appropriate change (an edit operation or the creation of
certain types of features). If you wish, you can delay the automatic update for edit operations
by using the Delayed Update on Edit option.
We can manually trigger an update of the entire model. You might, for example, want to use
a net null update to check whether an existing model will successfully update in a new version
of NX before you put a lot of additional work into modifying the model. (A net null update
mechanism forces a complete update of a model, without changing it.)
The manual methods include:
1. The NX Open C and C++, UF_MODL_update_all_features, which logs all the features in the
current work part to the NX update list, and then performs an update.
2. See the NX Open C and C++ Run-time Reference Help for more information.
3. The Playback option on the Edit Feature dialog, which recreates the model, starting at its first
feature.
4. You can step through the model as it is created one feature at a time, move forward or
backward to any feature, or trigger an update that continues until a failure occurs or the model
is complete.
14
5. The Edit during Update dialog, which appears when you choose Playback, also includes
options for analyzing and editing features of the model as it is recreated (especially useful for
fixing problems that caused update failures). Methods that users have tried in the past those have
led to some problems or are tricky to use: One method uses the Edit Feature dialog to change
the value of a parameter in each root feature of a part, and then
10 change it back before leaving the Edit Feature dialog.
6. This method produces a genuine net null update if used correctly, but you should ensure that
you changed a parameter in every root feature (and that you returned all the parameters to their
original values) before you trigger the update.
7. Another method, attempting to suppress all of the features in a part and then unsuppress them,
can cause updates that are not net null and that will fail.
The failures occur because not all features are suppressible; they are left in the model when
you try to suppress all features. As the update advances, when it reaches the point where most
features were suppressed, it will try to update the features that remain (this is like updating a
modified version of the model). Some of the "modifications" may cause the remaining features
to fail.
15
3.3 Common Concepts
16
Geometry
Topology
Connectivity
• UI Part
• JA Part
User Interface Part is consists of UI Component. A UI Component is a class that defines the
entire user interface for any particular piece of data, such as a vector, section, or application
specific data. As seen in g 3.1, the Block based UI approach includes a transient part and a
Figure 2.4: Block Based UI Approach persistent part.The work ow goes through three layers.
The layer which interacts with the user directly is the UI layer which takes the input from the
user and through JA it goes to builder layer.
17
Figure 3.4: Block based UI[23, 22]
Here it is important to mention about the UI Framework(UIFW). There are two roles that the UI
Framework (the UIFW module) serves. First, with all these UI Components floating around it is
necessary to have a framework present to execute them and bind them together into a cohesive
application.
Journamation
The word Journamation is a combination of the words Journaling and Automation. This is the
term used for the initiative to create an automation API and a record- and-replay capability
in NX. This API is to be used by both NX’s interactive UI to access application functionality
and by our customers in order to create their own automation programs. It is designed such
that when it is called by the UI, it is possible to generate a journal (in Visual Basic .NET) that
can be replayed in order to re-execute the work that was performed interactively. The API is
also designed to support several different modern object-oriented programming languages for
customer automation.
Fundamental to proper JA API design is understanding that the JA API is both a customer-facing
interface and the interface to be used by NX UI code to access application functionality. The
idealized view of NX architecture is shown in figure 3.5.
18
• The NX UI and the various language APIs all share a common entry point into the appli-
cation: the JA C API.
• The orange dashed line represents code that is generated entirely by processing a set of
interface definition(JA) files.
• The JAX C API layer(implementations of the methods) lies immediately underneath the
JA C API.
19
Chapter 4
Project Design
1. Create new input block which can take multiple string as input. this can be done by using
new input container and desired configuration.
2. Create new block for bounding object which can take multiple input.
1. Create a class which handle the curves and points of intersections and store them explicitly.
Builder Class
20
Steps to create the feature[27]
4. Discovering intersections.
There are many ways to start this work, but to finish our work in minimum work labor we need a
work plan of what to do? How to do? And what time it is going to take? For all this information
we need a chart where we can define the preceding of the work. below are the process work ow
chart, of how we proceed.
21
Figure 4.1: Network diagram of project
For the project its better to start with external function and then go to internal changes, as internal
changes are more than external interference.
22
Chapter 5
23
Figure 5.1: UML diagram of SP Class
• one is a single curve which can be any type of curve (conic curve, B-spline) on which a
point is to be created (Note: the point created is of condemn type) which is at minimum
distance with respect to the second input parameter.
• The second input parameter can take any object as input (Point, Conic Curve, Spline, Face
and Plane). The structure is shown in the below figure
24
Figure 5.2: UI of Minimum distance between two object[28]
This class has many function some function with their work are listed below.
• Constructor and destructor there function create and destroy objects at the time of creation
and completion of the command.
• Default_value this function generate the defaults for all the inputs.
• Configuration - In this we design the view of the UI and the order at which the input are
being displayed
• Selection_mask this function creates the filter for what to select and what not to select. It
creates a mask and limitation. Like if input is allowed only one curve the as soon as we
try to select another curve it rejects it. Or shut its highlight.
• Update this function is like a run-time update method it calls every time if there is selection
or deselection or any other activity.
• Press_cancel this function is call after we press cancel button. Basically what it does is it
delete all the objects created after this command run, and restore the screen to its original
state.
25
5.3 Builder class
Input
• It has same input as the UI. It takes the object selected in UI with the help of the pointer
and store it inside.
• Builder class is the object which helps in taking the input to a single place and do operation
on them, the operation may be checking validity of the inputs or analyzing the type of
input and conversion of input to other object. This class connects the automation API to
the central storage class. The property of this class is that it is transient type i.e. it deleted
after the command is complete.
This class has many function some function with their work are listed below.
• Constructor and destructor there function create and destroy objects at the time of creation
and completion of the command.
• Validate this function checks for the input given, if they are allowed or not or given what
is desired.
• Object_Conversion this function convert the input given to the different format which can
be readable to the internal function.
• Commit - this function create the main object of the Parameter class and calls it. it also
calls the update on this object if there in an edit or delete is called.
26
UML of builder Class
input
• Second Object - Collection object, Collection object include anyone of the entity
• It can also handle number of object at once in one single input if only faces are selected.
27
• Help Point - it is the first assumption point which is used in the equations to find the
minimum distance, it also help to find the final solution point at the time of multiplicity.
Output
• Solution_distance and point_set - store final distance and resultant point set. Final output
of this class is the point on the first curve which is at minimum distance to the second
object.
Functionality of SP class
• Check_input this function checks the compatibility of the input and the format it is in. like
if it is a conic curve then which type, or it is a collection object, then what the entities it
contain inside are, is it has one object or many.
• Start_function (type: extern, static) this is the main function the user is going to call, this
function is made static for the reason that it is going to call without an instance of any
object.
• Resolve_Multiplicity This function resolve the problem of multiple solution and give the
final one solution.
• Cut,Copy,Edit,Delete these are some function which are necessary to design for the oper-
ation point of view.
28
• Give_distance, Give_point - this function gives the output of the final distance and point
set.
5.6 Multiplicity
If there is simple curve with only one contact with the object then it is fine. But if there is more
than one output then computer cannot decide which output to take. And also if there is an edit
of command it can also give multiple output for same input.
So there is the need for the robustness of this kind of problem. And the solution of this problem
is by using a point which help us to find the solution point which is at minimum distance to this
point. Given below is the flow chart for how this multiplicity works.
29
• If the bounding object is empty.
30
Chapter 6
Trim Curve
It is function used to cut a curve into number of parts with respect to other object, it can also be
used to extend or even divide the curve. trim curve is a widely used one of the basic functionality
of any CAD software.
31
Figure 6.1: New trim curve Vs old trim curve[28, 27]
32
object Old Trim Curve New Trim Curve
Curve to trim take single curve take multiple string of curve
bounding object takes only two take multiple string and also sets of
bounding object bounding object
bounding object takes single object of take multiple strings and can take
type any type face set.
operation only trim trim and divide
select region not available can select on our own which
section to keep and which to delete
dashed curve not available make input curve dashed
Extended not available user can decide whether to include
intersection non intersecting object to be used
calculation as bounding object in trim
operation
Keep bounding after aply keep does’t need, as it can take multiple
object selected bounding object in input.
selection
Table 6.1: Difference in look of old and new trim curve
Selection intent is the selection type identifier. it defines that in which way we are going to select
the object or entity in the selection block. the selection intent of curve to trim is given in figure
6.2.
33
2. Connected curve - it will keep on adding the curves which are in direct contact with the
curve get selected. so all the curve connected to each other get selected in a single click.
4. Feature curve - it select those curve which are created by any feature. so all the curve
connected and created by the same feature get selected in block.
5. Face edge - only those curve get selected which is a part of the edge if an solid object.
6. Sheet edge - only those edges which are the part of any sheet body will be available for
selection.
34
Selection Intent of Bounding Object
In this there are two selection intent work simultaneously for curves and for faces. and the
coding was done in such a way that it works for both.
2. Tangent face - select the face which you click and the face which is joined with it and at
tangent to it.
3. Adjacent face - select the face and all the faces which are at direct contact with it.
4. Feature face - select all he face which are created or belong to the same feature.
6. Region face - create a region and all the face inside that region get selected.
The below figure 6.5show the flow of the input object and how it get handle inside.
35
Figure 6.5: Flow Chart Of Bounding Object Selection
Selection filter
Every selection is also incorporated with some filters, which pops up the error message at the
time of wrong selection. In the below figure a selection is made in such a way the two faces
are selected in one single container which belongs to two different body. So an error message
popup and say the the selection is invalid.
36
Figure 6.6: Selection Filter[28]
Design of UI
• Starts from curve to trim, the new object of “container” is used to deal the problem of
multiple strings of curve. The Curve Container is designed in such a way that it automati-
cally create space for new curve as we select and if we deselect the curve it automatically
delete it from the container.the selection intent rule are defined inside it.
• For bounding object the container used is called as versatile container which can manage
all type of object, whether it is curve or face. and also manage the space for selection and
deselection.
• A new area block is introduce which ask for the operation type to be “trim” or “di-
vide”.based on this the function is called either on trim core or on divide core.
• Select region is one more option in this block. it ease the user to select the portion of curve
to keep and discard, based on the user choice.
• One more option is added in setting block which asked for user to make the input curve
dashed after operation so that the person can identify the output more clearly.
37
All the working of the internal function like constructor, display structure of UI, update option
control of selection, storage of the selection snap,container management etc are written in C++.
38
UML diagram of builder class of trim curve
• Constructor - this function create the object and initialize it with the default value.
39
6.3 Automation API for trim curve[26]
automation API or the JA class works for the NX open environment. Every functionality of NX
has its journamation part in which different functions are written and designed to be used from
external source in form of coding, ex- NX open.
so trim curve is also have the JA part which work the following
• Create and convert the interface for different language like c++, python, visual basic etc.
• Used for recording the journamation. codes in journamation calls the JA function which
internally calls the builder function.
40
Chapter 7
Testing is the most crucial step in any work before it get finalize. Same in NX, if we do some
coding it has to pass through number of analysis and testing method describe below.
41
Figure 7.1: Debugging[29]
7.2 Auto-test
Build
This test the coding error with respect to compiler, there are two different compiler which check
the code. One is the C++ compiler acts as default compiler and second is Architecture Com-
piler which test the coding standards of the architecture way of writing code, specially check
automation code and schema code.
LANGUAGE Test
It test the output string of the program. As this program is used worldwide, it is used in more
than one language, so it is important to convert all the output string in different language. So
there are coding which transfer our output string to different language. Ant in this test we check
that thing.
Redundancy Test
it’s a quality checking which test the linking of the files. It checks all the header files, their
function prototype and function definition are proper or not. it also checks for any redundancy
42
in coding like if there is a conditional code in which one condition is always going to be true
then it shows error. similar with if we declare a variable and didn’t use the in program then it
shows the error.
Development-Test
In this the testing of the particular function is tested in various form on real parts inside NX. It
put lots of part in NX and test the functionality of the codes with number of inputs.
The complete test require almost 2 days to finish. After this the complete code is locked and
sent for the analysis to other experience programmer.
7.5 Results
Compatibility
The above code written will only work inside NX or by using API command system only. And
NX will work under any type of OS (Windows, Linux, Kali, Ubontu). The NX is available in
multiple language
Performance
The performance of the trim curve command in terms of usability and time consumption has
increase in following ways.
43
3. The types of bounding object it can take has also increased, now it can take curve face and
planes simultaneously.
Version Checking
It is possible that if someone created a part in NX 11 or below, the output of the trim curve he
use may differ to the latest version. So if he is using the latest NX12 and want to edit the part
of NX 10 then an error can occur in part. That’s why there is some codes for version checking
which checking the version of the part in which it made and give the output accordingly
Working Overview
• The trim curve option is available in the curve ribbon, and can also be found and accessed
from search results. start it by clicking on the trim curve option. as in figure 7.2 there are
three parallel lines to be trimmed w.r.t the two inclined lines.
44
Figure 7.2: overview figure 1[28]
• Click on the curve to trim and select curve one by one as shown in figure 7.3
45
Figure 7.3: overview figure 2[28]
• Click on the bounding object block, see that the selection intent has been changed now
pick one curve and click on new set to select another curve as shown in figure 7.4.
46
Figure 7.4: overview figure 3[28]
• Now click on the select Region and it will prompt for selection of the parts of the curve
which you want to keep or if change option which is below to it to change it to discard. so
if discard is selected, the regions you select will be deleted instead of keeping.
47
Figure 7.5: overview figure 4[28]
• Select setting based on the output you want. like in the given figure 7.6, the options
selected as associative feature, keep input curve, extension should be none means only
intersection are to be considered. and extended intersection calculation. the extended
intersection calculation is the option which take care of non intersecting curves which are
close to the curve to trim and the distance is falls below the tolerance limit.
48
Figure 7.6: overview figure 5[28]
• Press OK to complete the process and also you can press apply. the difference in OK and
apply is the if OK is pressed the function do the job and the block will get closed, and if
press apply then after the job the trim curve block will remain open
49
Figure 7.7: overview figure 6[28]
50
Chapter 8
8.1 Conclusion
Now there is a new smart Property inside NX which can be used easily by any object or func-
tionality anywhere. just by calling a function and it will create a point set on the first object
which is at minimum distance to second. it also handled the multiple face of a single body and
multiple output and give us a single minimum point set.
with the integration on new container it has made trim curve more faster by allowing to trim
multiple curves in one go.
And for integration of this property to trim curve now we can trim curve with a different option
then extension.
Renew
This is the new command which connect the old trim curve to new trim curve in such a way that
if someone want to upgrade the solution of the trim curve on the part made in below version to
the latest version. He can do that from here.
51
Bibliography
[1] Peter Hachenberger, Lutz Kettner, Kurt Mehlhorn, “Boolean operations on 3D selective
Nef complexes: Data structure, algorithms, optimized implementation and experiments”,
Computational Geometry, Vol. 38(4), April 2007, pp 64-99.
[2] J.M. Smith and N.A. Dodgson, “A topologically robust algorithm for Boolean operations
on polyhedral shapes using approximate arithmetic”, Computer Aided Design, Vol. 39(11),
November 2007, pp 149-163.
[3] Ouyang Ying-xiu, Tang Min, Lin Jun-cheng, Dong Jin-xiang, “Intersections of two offset
parametric surfaces based on topological analysis”, Journal of Zhejiang University Sci-
ence, Vol. 5(03), July 2004, pp 259-268.
[4] Kyu-Yeul Lee, Doo-Yeoun Cho, Tar-Wan Kim, “A Tracing Algorithm for Surface-Surface
Intersections on Surface Boundaries”, Journal of Computer Science and Technology, Vol.
17(6), November 2002, pp 843-850.Mortensen.M.E., Geometric Modeling, New York,
Jhon Wiley and Sons, Inc.1985.
[5] Shah J.J., Mantyla M. Parametric and Feature-Based CAD/CAM: Concepts, Tech-niques,
and Applications: Wiley-Interscience 2004.
[6] Matthias hauswirth, Andrea adamoli, “Teaching java programming with the informa
clicker system”, Science of computer programming, july 2011.
[7] Cees pierik, frank s. de boer, “”A proof outline logic for object-oriented programming”,
theoretical computer science, 2005.
[8] Jaroslav Mackerle, “” Object-oriented programming in FEM and BEM”, Advances in soft-
ware engineering, november 2003.
[9] Loveleen Kaur, Ashutosh Mishra, “Software component and the semantic Web: An
in-depth content analysis and integration history”,The journal of system and software,
November 2016.
52
[10] Udo Hertrich-jeromin, Bert juttler, Josef schicho, “New Developments in Geometry – The-
ory and Applications”, Computer aided geometric design, 2016.
[11] Tassio vale, Ivica Crnkovic, Eduardo Santana de almeida, “Component- based software
engineering”, The journal of system and software, september 2015.
[12] Hongji yang, Feng chen, Suleiman aliyu, “Modern software cybernatics: new trends”, The
journal of system and software, september 2016.
[14] Yao and Etzkorn, “semantic web service and ontology language”, The journal of system
and software, 2004.
[15] Zeid. I. , CAD/CAM, Theory and Practice, McGraw-Hill, New York, topology and basic
algorithms, 1991
[16] Herbert Schildt , C++: The Complete Reference, Osborne/McGraw-Hill; 3rd edition 1998.
[17] A J M Spencer, ET. al.Engineering Mathematics, Vol.1, Ch.6, (Van Nostrand Rein-hold).
[18] RW Hamming, Numerical Methods For Scientists And Engineers, ED-2, Ch-2.
[19] David F. Roger and J. Alan Adams, Mathematical element for Computer Graphics, 2nd
edition.
[20] Brian W. Kernighan and Dennis M. Ritchie, The C programming Language, Prentice-Hall,
1988
[22] UGS Library (Internal resource of Siemens Industry Software (India) Pvt. Ltd Pune)
[23] Parasolid documentation (Internal resource of Siemens Industry Software (India) Pvt. Ltd
Pune)
[24] www.cs.mtu.edu/ shene/courses/cs3621, this site contain the complete course for vector
and how to use them to solve graphical problem
[25] Umberto Cugini, The problem of user interface in geometric modeling, Com- puters in
Industry, Volume 17, Issue 4, Dec 1991.
53
[26] Other Internal Sources like OM Documentation , JA API Documentation.
54