[176] Geknickter Schnitt: Abwicklung je Segment, Knicklinien, Werkzeug und Griffe für Knickpunkte
Kern plan/section/unfold.rs: jedes Segment schneidet mit eigener Ebene, Schnittflächen auf den u-Bereich, Projektion an den Winkelhalbierenden zugeschnitten, Teilbilder lückenlos (u = abgewickelte Länge), dünne Knicklinie je Knick; Öffnungen/Achsen/Bäume je Segment. Ohne bendPoints unverändert. Schnittlinien-Befehl: weitere Klicks = Knicke, Enter/Doppelklick beendet (Ansicht weiter zwei Klicks). Griffe: Anfang, Knicke, Ende (grips.rs sectionLineGrip).
This commit is contained in:
18 files changed
+748
-39
No files matched your search
@@ -176,6 +176,13 @@ export function useGripEditing(opts: {
|
||||
// [149] Baum: Griff in der Stammmitte (verschieben) und am Kronenrand (Kronendurchmesser).
|
||||
const selectedTreeId = single(selection, "trees");
|
||||
const selectedTree = selectedTreeId ? (project.trees ?? []).find((x) => x.id === selectedTreeId) : undefined;
|
||||
// [176] Schnitt-/Ansichtslinie im Grundriss: Griffe an Anfang, Knickpunkten (`bendPoints`) und Ende.
|
||||
const selectedSectionLineId = single(selection, "sectionLines");
|
||||
const selectedSectionLine = modelEditable && selectedSectionLineId
|
||||
? project.drawingLevels.find((l) => l.id === selectedSectionLineId && l.linePoints)
|
||||
: undefined;
|
||||
const sectionLineGrips = (l: NonNullable<typeof selectedSectionLine>): Vec2[] =>
|
||||
l.linePoints ? [l.linePoints[0], ...(l.bendPoints ?? []), l.linePoints[1]] : [];
|
||||
// Mit gezeigter Beschriftung dazu ihr Griff (`labelOffset`, s. `treeGrips.ts`).
|
||||
const treeGrips = (tr: NonNullable<typeof selectedTree>): Vec2[] => treeGripPoints(tr, scaleDenominator);
|
||||
const selectedRoomId = single(selection, "rooms");
|
||||
@@ -315,6 +322,11 @@ export function useGripEditing(opts: {
|
||||
pts.forEach((_, i) => { gripOwners.push({ localIndex: i }); gripOwnerRange.push([0, pts.length - 1]); });
|
||||
return pts;
|
||||
}
|
||||
if (selectedSectionLine && effectiveDrawingIds.length === 0 && selectedWallIds.length === 0) {
|
||||
const pts = sectionLineGrips(selectedSectionLine);
|
||||
pts.forEach((_, i) => { gripOwners.push({ localIndex: i }); gripOwnerRange.push([0, pts.length - 1]); });
|
||||
return pts;
|
||||
}
|
||||
// [68] Baugrube: Umriss-Ecken + Sohlen-Griff (Lage: Schwerpunkt, y um die Sohlenhöhe versetzt).
|
||||
if (modelEditable && selectedExcavation && !selectedCeiling && effectiveDrawingIds.length === 0 && selectedWallIds.length === 0) {
|
||||
const pts = excavationGripPoints(selectedExcavation);
|
||||
@@ -911,6 +923,11 @@ export function useGripEditing(opts: {
|
||||
storeState().applyChange((p) => patchItem(p, "trees", tr.id, patch), `treeGrip:${tr.id}:${index}`);
|
||||
return;
|
||||
}
|
||||
// [176] Schnittlinie: Endpunkt bzw. Knickpunkt live, ein Undo-Schritt je Zug (Kern `grips.rs`).
|
||||
if (selectedSectionLine && effectiveDrawingIds.length === 0 && selectedWallIds.length === 0) {
|
||||
storeState().moveSectionLineGrip(selectedSectionLine.id, index, pt);
|
||||
return;
|
||||
}
|
||||
// [68] Baugrube: Sohlen-Griff sofort (Höhe), Ecken als Vorschau bis zum Setzen.
|
||||
if (selectedExcavation && !selectedCeilingId && !selectedRoomId) {
|
||||
if (index >= selectedExcavation.outline.length) moveExcavationGrip(selectedExcavation.id, index, pt);
|
||||
|
||||
Reference in new issue
Block a user