Skip to main content

Module brep

Module brep 

Source
Expand description

The B-rep of a Creo part as the VisibGeom section stores it: analytic surfaces with their contours, and edges sampled as point lists in the parameter spaces of both neighbouring faces.

Sld_VisGeom / active_geom
  srf_array[]  geom_id, geom_type (34 plane, 36 cylinder, 37 cone, 38 torus, 40 spline,
               41 fillet, 42 ruled), orient (±1), envlp, outline,
               srf_prim_ptr(<kind>) { local_sys[4][3] (rows 0–2: rotation by columns,
               row 3: origin), radius | half_angle | radius1, radius2 },
               frst_cntr_ptr / next_cntr_ptr { frst_cntr_crv_hdr_ptr, trv (1 outer, -1 hole) },
               topol_ref_data { list_id, list_type (98 = solid body) }
  crv_array[]  crv_id, type, crv_pnt_dir[2], crv_pnt_arr[n][4] = (u0 v0 u1 v1),
               crv_hdr_geom_ptr[0/1] (the two faces), next_crv_hdr_ptr[0/1] (next edge of
               the contour on that face)

The parametrisation of a face (direction of u and v, angle offset, which of the two angles of a torus is u, …) is not written; it is resolved by walking from planes with the identity frame across shared edges and keeping the variant whose points coincide with the neighbour’s.

Structs§

Brep
Conv
One way to read the parameters of a face.
Curve
Frame
A rigid frame: columns X, Y, Z and the origin.
Surface

Enums§

Kind

Functions§

candidates
The candidate conventions of a surface kind.
cross
dot
eval
The 3D point of parameters (u, v) on s read with c.
extract
Reads the faces and edges of a VisibGeom tree.
grow
Widens the box lo–hi to contain p.
lin
a + k·b.
norm
resolve
Resolves the convention of every face by walking from planes with the identity frame (and freeform faces, which have nothing to choose) across shared edges. A part without any such face – turned parts whose planes all lie across an off-axis axis – is seeded instead: one face is tried with each of its conventions, and the walk that makes the most edge samples coincide is kept. Faces that stay unresolved get the first candidate.
scale
k·a.
sub

Type Aliases§

P3