ODA Product: | ODA PRC SDK |
Sample Name: | OdPrcCreate |
Categories: | C++ / Beginner, Advanced / Working with .prc files / Android, iOS, macOS, Linux, Windows |
Source Code Location: | CommonApplications/Prc/Examples/OdPrcCreate |
A console sample application which illustrates creating entities of different types in a .prc file:
It also contains sample code for creating a .prc file, adding new model, schema data, creating and adding new file structures, global data sections and other complex .prc file objects.
To run the OdPrcCreate
sample application, please do the following:
<PRC_DIR>\exe\<version>
<PRC_DIR>/bin/<version>
<PRC_DIR>
is a directory where you unpacked the PRC SDK archive.
To determine your <version>
parameter, please see the
appropriate section
in the Download ODA PRC SDK topic.
OdPrcCreate <example> <filename>
example
|
The name of one of the available examples. See the full list of examples below. |
filename
|
A full path to the output .prc file to create. Created file can be opened with OdaPrcApp. |
Predefined names of examples are listed in tables below.
Example name | Description |
---|---|
BrepSphere | Sphere Brep export example |
BrepBox | Box Brep export example |
BrepModelSphere | Brep model filled with a sphere example |
BrepModelCylinder | Brep model filled with a cylinder example |
BrepModelCone | Brep model filled with a cone example |
BrepModelRuled | Brep model filled with a ruled surface example |
BrepModelExtrusion | Brep model filled with an extruded surface example |
BrepModelFromCurves | Brep model filled with a curved surface example |
BrepModelRevolution | Brep model filled with a revolution surface example |
BrepModelCylindrical | Brep model filled with a cylindrical surface example |
BrepModelNURBS | Brep model filled with a NURBS surface example |
BrepModelTorusT1 | Brep model filled with a torus of type1 example |
BrepModelTorusT2 | Brep model filled with a torus of type2 example |
BrepModelOffset | Brep model filled with an offset surface example |
BrepModelTransform | Brep model filled with a transform surface example |
BrepModelPlane | Brep model filled with a plane example |
BrepModelBlend01 | Brep model filled with a Blend01 surface example |
BrepModelBlend02 | Brep model filled with a Blend02 surface example |
BrepModelBlend03 | Brep model filled with a Blend03 surface example |
BrepModelConeWithLoops | Brep model filled with srfCone example with loops |
AllBrepModelExamples | Brep model filled with all surfaces example |
Example name | Description |
---|---|
RepresentationItemPolyWire | Representation item polyWire example |
RepresentationItemPointSet | Representation item PointSet example |
RepresentationItemPolyBrepModel | Representation item PolyBrepModel example |
RepresentationItemSet | Representation item with all RI type example |
TessObjectTexture | Textured PolyBrepModel textured example |
TessObjectTexture | Textured PolyBrepModel textured example |
BrepObjectMaterial | Brep with material model filled with srfPlane example |
BoxByVerticesExample | Brep box example generated by list of vertices |
PyramidByVerticesExample | Brep pyramid example generated by list of vertices |
TqsSolidByVerticesExample | Some Brep solid example generated by list of vertices |
ManyTqsSolidByVerticesExample | Many Brep solids example generated by list of vertices |
Example name | Description |
---|---|
SingleWireBodyCrvLine | Single wire body filled with CrvLine example |
SingleWireBodyCrvCircle | Single wire body filled with CrvCircle example |
SingleWireBodyCrvNURBS | Single wire body filled with CrvNURBS example |
SingleWireBodyCrvPolyLine | Single wire body filled with CrvPolyLine example |
SingleWireBodyCrvHyperbola | Single wire body filled with CrvHyperbola example |
SingleWireBodyCrvParabola | Single wire body filled with CrvParabola example |
SingleWireBodyCrvEllipse | Single wire body filled with CrvEllipse example |
SingleWireBodyCrvOnSurf | Single wire body filled with CrvOnSurf example |
SingleWireBodyCrvHelixT0 | Single wire body filled with CrvHelixT0 example |
SingleWireBodyCrvHelixT1 | Single wire body filled with CrvHelixT1 example |
SingleWireBodyCrvIntersection | Single wire body filled with CrvIntersection example |
SingleWireBodyCrvBlend02Boundary | Single wire body filled with CrvBlend02Boundary example |
SingleWireBodyCrvComposite | Single wire body filled with CrvComposite example |
SingleWireBodyCrvTransform | Single wire body filled with CrvTransform example |
SingleWireBodyCrvOffset | Single wire body filled with CrvOffset example |
SingleWireBodyCrvEquation | Single wire body filled with CrvEquation example |
SingleWireBodyCrvPolyLine2d | Single wire body filled with CrvPolyLine2d example |
SingleWireBodyCrvEquation2d | Single wire body filled with CrvEquation2d example |
SingleWireBodyCrvNURBS2d | Single wire body filled with CrvNURBS2d example |
SingleWireBodyCrvComposite2d | Single wire body filled with CrvComposite2d example |
SingleWireBodyCrvTransform2d | Single wire body filled with CrvTransform2d example |
SingleWireBodyCrvLine2d | Single wire body filled with CrvLine2d example |
SingleWireBodyCrvCircle2d | Single wire body filled with CrvCircle2d example |
SingleWireBodyCrvHyperbola2d | Single wire body filled with CrvHyperbola2d example |
SingleWireBodyCrvParabola2d | Single wire body filled with CrvParabola2d example |
SingleWireBodyCrvEllipse2d | Single wire body filled with CrvEllipse2d example |
AllSingleWireBodies | Single wire body filled with all curves example |
WireTessWithFlags | 3D polywire with flags |
Working with markup entities is implemented in the markupExample() function in MarkupExample.cpp. This function has four parameters:
The common algorithm is described below:
Creating .prc model data for markup is implemented in the CreateModelForMarkup() function:
The function CreateTopologyCommonForMarkup() creates a new product occurrence with markup common topology data. It takes two parameters:
Steps:
To create a markup entity and fill its topology, the FillTopoMarkups() function is used. The function accepts the following input data:
The algorithm implemented in the FillTopoMarkups() function includes the following operations:
Example name | Description |
---|---|
PlainTextMarkup | Markup example with plain text type. |
DistanceDimensionMarkup | Markup example with distance dimension type |
DimensionRadius | Markup markup example with dimension radius type |
DiameterDimension | Markup markup example with diameter dimension type |
TangentDiameterDimension | Markup markup example with tangent diameter dimension type |
CylinderDiameterDimension | Markup markup example with cylinder diameter dimension type |
LengthDimension | Markup markup example with length dimension type |
AngleDimension | Markup markup example with angle dimension type |
DatumIdentifier | Markup markup example with datum identifier type |
DatumTarget | Markup markup example with datum target type |
GDTMarkup | Markup example with geometric dimensioning and tolerance type |
RoughnessMarkup | Markup example with roughness type |
TableMarkup | Markup example with table type |
MarkupViewExample | View example with brep cylinder and markups |
MarkupAnnotationExample | Annotation example |
AllMarkupExamples | All markup examples |
Example name | Description |
---|---|
CreateComplexExample | Example with complex topology |
MeshBox | Box as mesh export example |
TriangleFan | Triangle fan export example |
TriangleStripe | Triangle stripe export example |
TessCombination | Combination of triangle stripe and triangle fan example |
TessExample2 | Many boxes as one prc tessellation per box export example |
TessExample1 | Many boxes as single prc tessellation export example |
Example name | Description |
---|---|
AttributeInt | Create sphere and write integer attribute in it |
AttributeTimeStamp | Create sphere and write time stamp attribute in it |
AttributeString | Create sphere and write string attribute in it |
AttributeDouble | Create sphere and write double attribute in it |
Copyright © 2002 – 2020. Open Design Alliance. All rights reserved.
|