Skip to content

Civil points: create points with the next point number and the groups' styles - #654

Closed
ramox81 wants to merge 3 commits into
hakanaktt:mainfrom
ramox81:codex/civil-point-creation
Closed

ramox81 wants to merge 3 commits into
hakanaktt:mainfrom
ramox81:codex/civil-point-creation

Conversation

@ramox81

@ramox81 ramox81 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
  1. create_cogo_point(doc, position, description, layer) adds a COGO point the way the point creation commands do. The point takes the drawing's next point number. Without that setting it takes one above the highest number, and it skips any number already in use. The setting then moves on to the number after the new point's. The point gets no point or label style of its own (0 in the point database), so its point group's styles draw it.
  2. The next point number is read from and written to the create-points settings node (AeccCreatePoints). It is the long key 0x01005408 in the node's settings list (BL 0, B 1, BL count, count × key after the children). Only that value's bits change when it is rewritten; the rest of the node is kept as it is. A node without the setting (a tree this crate wrote) is left as it is.
  3. point_creation_layer(doc) returns the layer the create-points settings name: the soft pointer key 0x0F005416, resolved through the node's references in the order of its reference keys. It returns None when no layer is named, in which case points go on the current layer.
  4. NO_ELEVATION (-1e20) is the stored z of a point made without an elevation.
  5. A tree written for a drawing without one gives its default point style the marker size the application gives a new drawing: 2.5 mm (0.0025) on a metric drawing, 0.1 in on an imperial one (before: 0.1 in always).
  6. Tests: a created point's number, no own styles, no elevation and description after a round trip; BL text encoding read back by the bit reader.

🤖 Generated with Claude Code

ramox81 and others added 2 commits November 24, 2026 16:41
create_cogo_point takes the drawing's next point number from its
create-points settings and advances it, and leaves the point without
point or label style of its own so its point group draws it.
point_creation_layer reads the layer those settings name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tree written for a metric drawing gets the 2.5 mm marker the
application gives a new metric drawing's point style, an imperial one
the 0.1 in it had before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ex/civil-point-creation

# Conflicts:
#	src/classes/civil/create/mod.rs
HakanSeven12 added a commit that referenced this pull request Nov 24, 2026
# Conflicts:
#	src/classes/civil/create/mod.rs
@HakanSeven12

Copy link
Copy Markdown
Collaborator

Merged into main as 265cc68 (merge conflict in create/mod.rs exports resolved next to the stormwater exports). OCS picks it up through opencaddocument 0b5d7e9 together with HakanSeven12/OpenCADStudio#3600.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants