{Code:1,Name:"直铺(工字拼)Straight Lay",Category:"wood",Pattern:"planks running from bottom-left toward top-right of the image, joints staggered randomly, at least 6 inch offset between rows"},
{Code:2,Name:"横铺 Horizontal Lay",Category:"wood",Pattern:"planks running horizontally left to right, parallel to the bottom edge of the image, joints staggered randomly, at least 6 inch offset"},
{Code:3,Name:"人字拼 Herringbone",Category:"wood",Pattern:"planks at 90° forming continuous zigzag V-lines from bottom-left to top-right of the image"},
{Code:4,Name:"鱼骨拼 Chevron",Category:"wood",Pattern:"planks with 45° mitered ends forming continuous V-points aligned from bottom-left to top-right of the image"},
{Code:3,Name:"人字铺 Herringbone",Category:"wood",Pattern:"ALL planks must be IDENTICAL width - no piece may appear narrower. Planks at 90 degrees forming continuous zigzag V-lines from bottom-left to top-right of the image. At far distance, planks remain distinct with visible seams - NOT merging into a solid mass."},
{Code:4,Name:"鱼骨铺 Chevron",Category:"wood",Pattern:"planks with 45 degree mitered ends forming continuous V-points aligned from bottom-left to top-right of the image"},
}
vartilePatterns=[]PatternOption{
@ -57,7 +59,7 @@ var tilePatterns = []PatternOption{
{Code:6,Name:"工字铺(1/2错缝)Running Bond",Category:"tile",Pattern:"rows parallel to bottom edge of image, each row offset 50% from previous, horizontal grout lines continuous, vertical grout lines staggered"},
{Code:7,Name:"三七错铺 1/3 Offset",Category:"tile",Pattern:"rows parallel to bottom edge of image, each row offset exactly 33% of tile length, every third row aligns"},
{Code:8,Name:"六边形 Hexagonal",Category:"tile",Pattern:"six-sided tiles interlocked in honeycomb mesh, flat edges horizontal (parallel to bottom edge of image), grout follows hexagonal edges"},
{Code:9,Name:"斜铺(60度对角)Diagonal",Category:"tile",Pattern:"tiles rotated 60° to the image frame, grout lines run diagonally at 60° and 150° to the bottom edge, no lines parallel to image edges"},
{Code:9,Name:"斜铺(60度对角)Diagonal",Category:"tile",Pattern:"tiles rotated 60 degrees to the image frame, grout lines run diagonally at 60 and 150 degrees to the bottom edge, no lines parallel to image edges"},
// buildPatternConstraint returns installation rules specific to each pattern code.
funcbuildPatternConstraint(codeint)string{
switchcode{
case1:
return`PATTERN RULES — Straight Lay (wood): Planks run from the bottom-left of the image toward the top-right, at roughly 45° to the image frame. Long edges of each plank point toward the upper-right corner. Joints staggered 6" minimum — random pattern. 1/8" expansion gap.`
return"铺法规则:木地板直铺,板材连续铺设,接缝随机错开至少 6 英寸。"
case2:
return`PATTERN RULES — Horizontal Lay (wood): Planks run horizontally — left to right, parallel to the bottom edge of the image. Long edges of each plank are horizontal across the photo. Joints staggered 6" minimum — random pattern. 1/8" expansion gap.`
return"铺法规则:木地板横铺,板材沿房间主方向铺设,接缝随机错开至少 6 英寸。"
case3:
return`PATTERN RULES — Herringbone (wood): Planks at 90° forming continuous zigzag. Each plank end meets neighbor at 90°. V-lines run from bottom-left to top-right of the image. Joints tight — continuous unbroken zigzag.`
return"铺法规则:人字拼,板材 90 度相接形成连续折线,每片板宽一致,接缝清楚。"
case4:
return`PATTERN RULES — Chevron (wood): Planks with 45° mitered ends form continuous V. V-points aligned in a straight line running bottom-left to top-right across the image. Joint lines are straight and continuous. NOT herringbone — mitered joints, not staggered.`
return"铺法规则:鱼骨拼,板材 45 度斜切端形成连续 V 形,必须是斜切对接。"
case5:
return`PATTERN RULES — Straight Grid (tile): Tiles aligned in rows and columns. Grout lines run horizontally (parallel to bottom edge of image) and vertically (perpendicular to bottom edge). NO offset between rows. Grout ~1/8".`
return"铺法规则:瓷砖直铺网格对缝,砖块成行成列对齐,无错缝,砖缝约 1/8 英寸。"
case6:
return`PATTERN RULES — Running Bond (tile): Each row offset 50% from previous — classic brickwork. Grout lines parallel to bottom edge of image are continuous; grout lines perpendicular to bottom edge are staggered. Grout ~1/8".`
return"铺法规则:瓷砖工字铺,相邻行错开砖长的 50%,行向砖缝连续,竖向接缝错开。"
case7:
return`PATTERN RULES — 1/3 Offset (tile): Each row offset exactly 33% of tile length. Every third row aligns. Rows run parallel to bottom edge of image. Grout ~1/8". NOT 50% bond — offset is exactly 1/3.`
return`PATTERN RULES — Hexagonal (tile): Six-sided tiles interlocked in honeycomb mesh. Each tile touches 6 neighbors. Flat edges of hexagons are horizontal (parallel to bottom edge of image). Grout follows hexagonal edges — network pattern, not grid.`
return"铺法规则:六边形瓷砖,六边形砖互锁成蜂窝网,砖缝沿六边形边缘,不是方格网。"
case9:
return`PATTERN RULES — Diagonal (tile): Tiles rotated 60° relative to the image frame — all tiles at a steep diagonal, diamond orientation. Grout lines run diagonally across the photo at 60° and 150° to the bottom edge. None parallel or perpendicular to image edges. Triangle cuts at all walls. Grout ~1/8".`
"\nSIZE: This product comes in multiple sizes: %s.\nONLY change board width and seam spacing. The material texture, color, and grain are from the reference image — identical in every size. Wider boards use the SAME texture source, just with fewer seams. Do NOT reinterpret the wood to look \"more premium\" for wider planks.",
strings.Join(variantList,", "),
)
}
}elseiffloor.SizeLabel!=""{
sizeInstruction=fmt.Sprintf(
"\nSIZE: Each piece is %s. Only adjust board proportion and seam spacing. The material texture is from the reference image — do not change it.",
floor.SizeLabel,
)
}elseiffloor.WidthIn>0&&floor.LengthIn>0{
sizeInstruction=fmt.Sprintf(
`\nSIZE: Each piece is %.1f" × %.1f". Only adjust board proportion and seam spacing. The material texture is from the reference image — do not change it.`,
returnfmt.Sprintf("地板产品:\nSKU:%s\n产品名:%s(这是商品目录名,不是视觉效果指令)\n类型:%s\n材质:%s\n铺法:%s。%s\n\n材质规则:\n%s\n%s\n\n禁止:\nno wet floor, no puddles, no water stains, no color shift, no green/blue/yellow/cyan patches, no new lights, no new shadows, no CGI, no text, no watermark。",
constmaskImageInstruction="The next image is a mask. Non-black pixels mark regions to edit; black pixels mark protected regions that must remain unchanged."
constreferenceImageInstruction="The next image is a reference for the floor material style. Match its color, texture, pattern, and overall appearance exactly when generating the new floor. The generated floor should look like this material."
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.