cadjoint cadjoint CADJOINT

  • Overview
  • Getting started
  • Guides
    • Modelling
    • Meshing
    • Simulation
    • Materials
    • Optimization
    • Rendering
    • Plugins
    • Flow solver
  • Playground
  • API reference
    • API reference
    • Parameters and geometry
      • Parameters
        • geometry.Parameter
        • geometry.Scalar
        • geometry.Vector
        • geometry.Vector2
        • geometry.as_parameter
        • geometry.deduplicate_params
      • Parameter extraction
        • extract_parameters
        • apply_parameters
    • Sketches and construction
      • Sketches
        • construction.SketchPlane
        • construction.PolygonProfile
      • Features
        • construction.extrude
        • construction.revolve
        • construction.loft
        • construction.Solid
        • construction.ConstructionPrimitive
      • Face references
        • construction.Face
        • construction.FaceSet
        • construction.Feature
        • construction.Axis
    • Constraints
      • Constraint types
        • constraints.Constraint
        • constraints.DistanceConstraint
        • constraints.AngleConstraint
        • constraints.HorizontalConstraint
        • constraints.VerticalConstraint
        • constraints.CoincidentConstraint
        • constraints.FixedConstraint
        • constraints.EqualLengthConstraint
        • constraints.PointOnLineConstraint
        • constraints.ParallelConstraint
        • constraints.PerpendicularConstraint
        • constraints.ParallelEdgesConstraint
        • constraints.PerpendicularEdgesConstraint
      • Solving and projection
        • solve_constraints
        • constraints.satisfy_constraints
        • constraints.constraint_residuals
        • constraints.project_to_manifold
        • constraints.make_manifold_projection
        • constraints.project_bounds
        • constraints.make_bounds_projection
      • Degrees of freedom
        • constraints.all_parameters
        • constraints.total_dof_reduction
        • constraints.build_residual_fn
        • constraints.compute_param_vector
        • constraints.unpack_param_vector
        • constraints.null_space
        • constraints.NullSpaceMap
    • Solids
      • Base class
        • SDF
      • Primitives
        • sdf.Primitive
        • sdf.Box
        • sdf.RoundBox
        • sdf.Sphere
        • sdf.Cylinder
        • sdf.Capsule
        • sdf.Torus
        • sdf.Plane
        • sdf.primitives.ExtrudedPolygon
        • sdf.primitives.RevolvedPolygon
        • sdf.primitives.LoftedPolygon
        • sdf.primitives.polygon_sdf_2d
      • Booleans
        • sdf.Union
        • sdf.Intersection
        • sdf.Difference
        • sdf.Xor
        • sdf.BooleanOp
        • sdf.union
        • sdf.intersection
        • sdf.difference
        • sdf.xor
        • sdf.smooth_min
        • sdf.smooth_max
      • Transforms
        • sdf.Translate
        • sdf.Rotate
        • sdf.Scale
        • sdf.Twist
        • sdf.Shell
        • sdf.Offset
        • sdf.Mirror
        • sdf.shell
        • sdf.offset
        • sdf.mirror
      • Patterns
        • sdf.LinearPattern
        • sdf.PolarPattern
        • sdf.linear_pattern
        • sdf.polar_pattern
      • Measure
        • sdf.volume
        • sdf.material_mass
    • Functionalize and parametrization
      • Functionalize
        • functionalize
        • functionalize_scene
        • functionalize.functionalize_parametric
        • functionalize.functionalize_scene_parametric
      • Parametrization
        • to_unconstrained
        • to_constrained
        • compute_param_scales
        • normalize
        • unnormalize
        • to_normalized
        • from_normalized
    • Meshing
      • Extraction
        • meshing.extract_mesh
        • meshing.Mesh
        • meshing.GridSpec
        • meshing.sample_grid
        • meshing.find_crossing_edges
        • meshing.CrossingEdges
        • meshing.edge_hermite_data
        • meshing.HermiteData
        • meshing.detect_edges
        • meshing.qef_vertices
        • meshing.sharp_qef_vertices
        • meshing.dual_faces
      • Sharp features
        • meshing.classify_feature_cells
        • meshing.FeatureCells
        • meshing.cell_edge_incidence
        • meshing.manifold_cell_incidence
        • meshing.CellIncidence
        • meshing.feature_cell_links
        • meshing.active_branches
        • meshing.detect_branch_changes
        • meshing.exact_feature_mask
        • meshing.ScenePatchFields
        • meshing.scene_patch_fields
        • meshing.world_frame_leaves
        • meshing.signature_function
        • meshing.patch_signatures
      • Adaptive extraction and simplification
        • meshing.surface_cells
        • meshing.sparse_crossing_edges
        • meshing.bounds.fit_bounds
        • meshing.bounds.boundary_inside
        • meshing.simplify_mesh
      • Export and diagnostics
        • meshing.save_obj
        • meshing.save_stl
        • meshing.save_step
        • meshing.remove_slivers
        • meshing.merge_planar_faces
        • meshing.mesh_report
        • meshing.surface_deviation
        • meshing.triangle_quality
        • meshing.self_intersections
    • Simulation
      • Meshes
        • fem.SimMesh
        • fem.HexMesh
        • fem.TetMesh
        • fem.sdf_to_hex_mesh
        • fem.sdf_to_tet_mesh
        • fem.recompute_points
        • fem.recompute_tet_points
        • fem.project_points
        • fem.Discretization
        • fem.Surface
        • fem.FaceGroup
        • fem.select_faces
        • fem.faces_from_nodes
        • fem.tet_faces_from_nodes
      • Mesh quality
        • fem.scaled_jacobians
        • fem.aspect_ratios
        • fem.corner_tet_volumes
        • fem.tet_aspect_ratios
        • fem.tet_radius_ratios
      • Studies
        • fem.ThermalStudy
        • fem.ElasticStudy
        • fem.SimulationResult
        • fem.ThermalProblem
        • fem.ElasticProblem
        • studies.capture_studies
        • studies.declared_studies
        • studies.register_study
        • fem.capture_sim_meshes
      • Boundary conditions
        • fem.Dirichlet
        • fem.HeatFlux
        • fem.Fixed
        • fem.Traction
      • Node selections
        • studies.Nodes
        • studies.NodeSelection
        • studies.selection_from_description
        • studies.boundary_node_mask
        • studies.BoundaryMesh
      • Material properties
        • fem.properties.sample_material_field
        • fem.properties.sample_cell_property
        • fem.properties.maybe_sample_cell_property
        • fem.properties.cell_centroids
        • fem.properties.cell_volumes
        • fem.properties.total_mass
        • fem.properties.quantize_to_materials
      • Solver backends
        • fem.backends.SolverBackend
        • fem.backends.get_backend
        • fem.backends.register_backend
        • fem.backends.available_backends
      • Gmsh tet meshing
        • fem.gmsh.gmsh_available
        • fem.gmsh.gmsh_version
        • fem.gmsh.sdf_gmsh_tet_mesh
        • fem.gmsh.gmsh_tet_mesh
        • fem.gmsh.tet_mesh_from_gmsh
        • fem.gmsh.GmshMesh
        • fem.gmsh.GmshTetMesh
        • fem.gmsh.gmsh_topology
        • fem.gmsh.dc_surface_stl
        • fem.gmsh.surface_stl
        • fem.gmsh.patch_table
        • fem.gmsh.design_values
        • fem.gmsh.snap_toward_patches
        • fem.gmsh.assign_ownership
        • fem.gmsh.owned_nodes
    • Optimization
      • optimize.Optimization
      • optimize.OptimizationRun
      • optimize.capture_optimizations
    • Materials
      • Material
      • materials.catalogue
      • materials.aluminium_6061
      • materials.copper_c11000
      • materials.steel_1018
      • materials.titanium_ti6al4v
      • materials.fr4
      • materials.silicon
      • materials.thermal_pad
      • materials.pla
    • Rendering and shader compilation
      • Forward renderer
        • render.Scene
        • render.Camera
        • render.RenderSettings
        • render.render_scene
        • render.render_raymarched
        • render.raymarch
        • render.make_gradient_sky
      • Construction overlay
        • render.project_points
        • render.draw_profile
        • render.draw_plane
      • Shader compilation
        • backends.compile_sdf_to_wgsl
        • backends.compile_scene_to_wgsl
        • backends.wgsl.compile_scene_with_uniforms
        • backends.wgsl.ShaderProgram
        • backends.wgsl.ShaderParameter
      • Notebook viewer
        • viewer.widget.SDFViewer
    • Plugins and extension contracts
      • Plugins
        • plugins.Plugin
        • plugins.PythonPlugin
        • plugins.TesseractPlugin
        • plugins.Capabilities
        • plugins.PluginProbe
        • plugins.PluginMismatch
        • plugins.PluginConfigError
        • plugins.Differentiable
      • Registry and configuration
        • plugins.PluginRegistry
        • plugins.PluginSpec
        • plugins.registry
        • plugins.set_registry
        • plugins.get_plugin
        • plugins.plugin_for_kind
        • plugins.register_plugin
        • plugins.available_plugins
        • plugins.build_registry
        • plugins.builtin_specs
        • plugins.entry_point_specs
        • plugins.load_config
        • plugins.parse_config
        • plugins.config_path
        • plugins.runtime_scratch
        • plugins.scratch_root
      • Extension contracts
        • plugins.NodeMap
        • plugins.FeatureEdges
        • plugins.BRepExtractor
        • plugins.StepExporter
        • plugins.Drag
        • plugins.OwnedNodes
        • plugins.EdgeSet
        • plugins.DragOutcome
    • Flow solver (prototype)
      • Domain and solve
        • flow.FlowGrid
        • flow.solid_fraction
        • flow.sample_solid_fraction
        • flow.FlowConfig
        • flow.FlowResult
        • flow.solve
        • flow.convergence
        • flow.recommended_alpha_max
        • flow.SteadyOptions
        • flow.steady_populations
        • flow.iterate_to_steady
        • flow.unrolled_populations
        • flow.residual_history
      • Flow studies
        • flow.FlowStudy
        • flow.FlowStudyResult
        • flow.Inlet
        • flow.Outlet
        • flow.Walls
        • flow.HeatSource
        • flow.HeldTemperature
        • flow.region_mask
      • Energy equation
        • flow.EnergyConfig
        • flow.solve_temperature
        • flow.conductivity
      • Objectives
        • flow.pressure_drop
        • flow.heat_transfer_proxy
        • flow.thermal_resistance
        • flow.peak_temperature
        • flow.mean_temperature
        • flow.bulk_outlet_temperature
        • flow.energy_imbalance
        • flow.fields
        • flow.pressure
      • Lattice
        • flow.equilibrium
        • flow.macroscopic
        • flow.stream
        • flow.step
        • flow.step_for
        • flow.initial_populations
        • flow.bounce_back_mask
        • flow.duct_walls
        • flow.omega_from_viscosity
        • flow.viscosity_from_omega
    • Utilities
      • Compilation cache
        • cache.enable_compilation_cache
        • cache.cache_directory
        • cache.prune_compilation_cache
        • cache.min_compile_seconds
      • Option sets
        • enums.Option
        • enums.MeshMethod
        • enums.TetMesher
        • enums.StudyKind
        • enums.BoundaryConditionType
        • enums.Side
        • enums.ObjectiveMetric
        • enums.OptimizerMethod
        • enums.OptimizationArgument
        • enums.GradientPath
        • enums.Precision
        • enums.ConstraintKind
        • enums.ConstraintSolveMethod
        • enums.ExportFormat
        • enums.FemBackend
        • enums.PluginKind
        • enums.PluginTransport
        • enums.values
        • enums.listed
        • enums.either
        • enums.parse
      • Tier availability
        • tier.status
        • tier.available
        • tier.require
        • tier.component
        • tier.message
        • tier.report
        • tier.absent
        • tier.TierUnavailable
        • tier.TierStatus
        • tier.KindStatus
    • Playground payload schema (internal)
      • viewer.schema.CompilePayload
      • viewer.schema.ConstructionNode
      • viewer.schema.ConstructionElement
      • viewer.schema.ConstructionArgument
      • viewer.schema.ConstructionFace
      • viewer.schema.ConstructionPlane
      • viewer.schema.ConstructionVertex
      • viewer.schema.ConstructionConstraint
      • viewer.schema.ConstructionRelation
      • viewer.schema.ConstructionOperator
      • viewer.schema.ConstructionTransform
      • viewer.schema.ConstraintSolverRun
      • viewer.schema.PlaneReference
      • viewer.schema.FaceOwner
      • viewer.schema.DomainEntry
      • viewer.schema.IdentityEntry
      • viewer.schema.MaterialDefinition
      • viewer.schema.SimMeshPayload
      • viewer.schema.MeshEdgePayload
      • viewer.schema.StudyPayload
      • viewer.schema.StudySelection
      • viewer.schema.StudyBc
      • viewer.schema.OptimizationPayload
      • viewer.schema.PatchAddress
      • viewer.schema.PatchRequest
      • viewer.schema.PatchResponse
      • viewer.schema.ExportRequest
      • viewer.schema.validate_patch_request
      • viewer.schema.typescript_source

On this page

  • meshing.feature_cell_links
    • Parameters
    • Returns

meshing.feature_cell_links

meshing.feature_cell_links(feature_mask, incidence, grid, *, junction_mask=None)

Link feature cells that are lattice neighbors (diagonals included).

A feature curve — a crease, a corner fan, a CSG seam — crosses cells diagonally as often as it crosses them face-to-face, so consecutive feature cells along the curve are generally not connected by a mesh edge; drawing the sharp mesh edges instead produces a staircase around the true curve. Because feature-aware vertex placement puts every feature cell’s vertex exactly on the curve, connecting neighboring feature vertices directly yields chords of the true curve.

Parameters

Name Type Description Default
feature_mask np.ndarray Boolean mask over incidence rows selecting feature cells (creases, corners, seams). required
incidence CellIncidence Cell-to-edge mapping whose rows the mask indexes. required
grid GridSpec The sampling grid (for lattice strides). required
junction_mask np.ndarray | None Optional boolean mask over incidence rows marking junction cells (corners). A link between two cells that share a junction neighbor is a shortcut across the junction — the true feature path runs through it — and is dropped. None

Returns

Name Type Description
np.ndarray Unordered incidence-row pairs shaped (link_count, 2); each pair
np.ndarray of cells is within Chebyshev distance 1 of the other.

cadjoint

 
  • Research notes (GitHub)