ducpy 2.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. ducpy-2.3.1/.gitignore +170 -0
  2. ducpy-2.3.1/LICENSE +21 -0
  3. ducpy-2.3.1/PKG-INFO +83 -0
  4. ducpy-2.3.1/README.md +65 -0
  5. ducpy-2.3.1/docs/Makefile +20 -0
  6. ducpy-2.3.1/docs/conf.py +47 -0
  7. ducpy-2.3.1/docs/index.rst +8 -0
  8. ducpy-2.3.1/docs/make.bat +35 -0
  9. ducpy-2.3.1/package.json +17 -0
  10. ducpy-2.3.1/pyproject.toml +57 -0
  11. ducpy-2.3.1/release.config.cjs +24 -0
  12. ducpy-2.3.1/setup.cfg +4 -0
  13. ducpy-2.3.1/setup.py +63 -0
  14. ducpy-2.3.1/src/__init__.py +1 -0
  15. ducpy-2.3.1/src/ducpy/Duc/ANGULAR_UNITS_FORMAT.py +10 -0
  16. ducpy-2.3.1/src/ducpy/Duc/AXIS.py +8 -0
  17. ducpy-2.3.1/src/ducpy/Duc/AlternateUnits.py +97 -0
  18. ducpy-2.3.1/src/ducpy/Duc/AngularUnitSystem.py +71 -0
  19. ducpy-2.3.1/src/ducpy/Duc/BEZIER_MIRRORING.py +8 -0
  20. ducpy-2.3.1/src/ducpy/Duc/BLENDING.py +12 -0
  21. ducpy-2.3.1/src/ducpy/Duc/BLOCK_ATTACHMENT.py +7 -0
  22. ducpy-2.3.1/src/ducpy/Duc/BOOLEAN_OPERATION.py +9 -0
  23. ducpy-2.3.1/src/ducpy/Duc/BoundElement.py +67 -0
  24. ducpy-2.3.1/src/ducpy/Duc/COLUMN_TYPE.py +8 -0
  25. ducpy-2.3.1/src/ducpy/Duc/Checkpoint.py +110 -0
  26. ducpy-2.3.1/src/ducpy/Duc/ColumnLayout.py +104 -0
  27. ducpy-2.3.1/src/ducpy/Duc/CustomHatchPattern.py +104 -0
  28. ducpy-2.3.1/src/ducpy/Duc/DATUM_BRACKET_STYLE.py +8 -0
  29. ducpy-2.3.1/src/ducpy/Duc/DATUM_TARGET_TYPE.py +9 -0
  30. ducpy-2.3.1/src/ducpy/Duc/DECIMAL_SEPARATOR.py +7 -0
  31. ducpy-2.3.1/src/ducpy/Duc/DIMENSION_FIT_RULE.py +9 -0
  32. ducpy-2.3.1/src/ducpy/Duc/DIMENSION_TEXT_PLACEMENT.py +8 -0
  33. ducpy-2.3.1/src/ducpy/Duc/DIMENSION_TYPE.py +18 -0
  34. ducpy-2.3.1/src/ducpy/Duc/DIMENSION_UNITS_FORMAT.py +10 -0
  35. ducpy-2.3.1/src/ducpy/Duc/DatumReference.py +67 -0
  36. ducpy-2.3.1/src/ducpy/Duc/Delta.py +110 -0
  37. ducpy-2.3.1/src/ducpy/Duc/DictionaryEntry.py +67 -0
  38. ducpy-2.3.1/src/ducpy/Duc/DimensionBaselineData.py +54 -0
  39. ducpy-2.3.1/src/ducpy/Duc/DimensionBindings.py +92 -0
  40. ducpy-2.3.1/src/ducpy/Duc/DimensionContinueData.py +54 -0
  41. ducpy-2.3.1/src/ducpy/Duc/DimensionDefinitionPoints.py +126 -0
  42. ducpy-2.3.1/src/ducpy/Duc/DimensionExtLineStyle.py +84 -0
  43. ducpy-2.3.1/src/ducpy/Duc/DimensionFitStyle.py +80 -0
  44. ducpy-2.3.1/src/ducpy/Duc/DimensionLineStyle.py +71 -0
  45. ducpy-2.3.1/src/ducpy/Duc/DimensionSymbolStyle.py +104 -0
  46. ducpy-2.3.1/src/ducpy/Duc/DimensionToleranceStyle.py +123 -0
  47. ducpy-2.3.1/src/ducpy/Duc/DimensionValidationRules.py +106 -0
  48. ducpy-2.3.1/src/ducpy/Duc/DucArrowElement.py +71 -0
  49. ducpy-2.3.1/src/ducpy/Duc/DucBlock.py +186 -0
  50. ducpy-2.3.1/src/ducpy/Duc/DucBlockAttributeDefinition.py +93 -0
  51. ducpy-2.3.1/src/ducpy/Duc/DucBlockAttributeDefinitionEntry.py +71 -0
  52. ducpy-2.3.1/src/ducpy/Duc/DucBlockCollection.py +160 -0
  53. ducpy-2.3.1/src/ducpy/Duc/DucBlockCollectionEntry.py +67 -0
  54. ducpy-2.3.1/src/ducpy/Duc/DucBlockDuplicationArray.py +93 -0
  55. ducpy-2.3.1/src/ducpy/Duc/DucBlockInstance.py +171 -0
  56. ducpy-2.3.1/src/ducpy/Duc/DucBlockInstanceElement.py +41 -0
  57. ducpy-2.3.1/src/ducpy/Duc/DucBlockMetadata.py +132 -0
  58. ducpy-2.3.1/src/ducpy/Duc/DucCommonStyle.py +75 -0
  59. ducpy-2.3.1/src/ducpy/Duc/DucDimensionElement.py +229 -0
  60. ducpy-2.3.1/src/ducpy/Duc/DucDimensionStyle.py +143 -0
  61. ducpy-2.3.1/src/ducpy/Duc/DucDocElement.py +168 -0
  62. ducpy-2.3.1/src/ducpy/Duc/DucDocStyle.py +92 -0
  63. ducpy-2.3.1/src/ducpy/Duc/DucEllipseElement.py +110 -0
  64. ducpy-2.3.1/src/ducpy/Duc/DucEmbeddableElement.py +58 -0
  65. ducpy-2.3.1/src/ducpy/Duc/DucExternalFileData.py +132 -0
  66. ducpy-2.3.1/src/ducpy/Duc/DucExternalFileEntry.py +71 -0
  67. ducpy-2.3.1/src/ducpy/Duc/DucFeatureControlFrameElement.py +159 -0
  68. ducpy-2.3.1/src/ducpy/Duc/DucFeatureControlFrameStyle.py +109 -0
  69. ducpy-2.3.1/src/ducpy/Duc/DucFrameElement.py +58 -0
  70. ducpy-2.3.1/src/ducpy/Duc/DucFreeDrawElement.py +276 -0
  71. ducpy-2.3.1/src/ducpy/Duc/DucFreeDrawEnds.py +80 -0
  72. ducpy-2.3.1/src/ducpy/Duc/DucGlobalState.py +184 -0
  73. ducpy-2.3.1/src/ducpy/Duc/DucGroup.py +71 -0
  74. ducpy-2.3.1/src/ducpy/Duc/DucHatchStyle.py +140 -0
  75. ducpy-2.3.1/src/ducpy/Duc/DucHead.py +80 -0
  76. ducpy-2.3.1/src/ducpy/Duc/DucImageElement.py +157 -0
  77. ducpy-2.3.1/src/ducpy/Duc/DucImageFilter.py +67 -0
  78. ducpy-2.3.1/src/ducpy/Duc/DucLayer.py +101 -0
  79. ducpy-2.3.1/src/ducpy/Duc/DucLayerOverrides.py +75 -0
  80. ducpy-2.3.1/src/ducpy/Duc/DucLeaderElement.py +109 -0
  81. ducpy-2.3.1/src/ducpy/Duc/DucLeaderStyle.py +134 -0
  82. ducpy-2.3.1/src/ducpy/Duc/DucLine.py +75 -0
  83. ducpy-2.3.1/src/ducpy/Duc/DucLineReference.py +71 -0
  84. ducpy-2.3.1/src/ducpy/Duc/DucLinearElement.py +71 -0
  85. ducpy-2.3.1/src/ducpy/Duc/DucLocalState.py +375 -0
  86. ducpy-2.3.1/src/ducpy/Duc/DucMermaidElement.py +97 -0
  87. ducpy-2.3.1/src/ducpy/Duc/DucParametricElement.py +75 -0
  88. ducpy-2.3.1/src/ducpy/Duc/DucPath.py +114 -0
  89. ducpy-2.3.1/src/ducpy/Duc/DucPdfElement.py +71 -0
  90. ducpy-2.3.1/src/ducpy/Duc/DucPlotElement.py +92 -0
  91. ducpy-2.3.1/src/ducpy/Duc/DucPlotStyle.py +41 -0
  92. ducpy-2.3.1/src/ducpy/Duc/DucPoint.py +80 -0
  93. ducpy-2.3.1/src/ducpy/Duc/DucPointBinding.py +131 -0
  94. ducpy-2.3.1/src/ducpy/Duc/DucPolygonElement.py +71 -0
  95. ducpy-2.3.1/src/ducpy/Duc/DucRectangleElement.py +58 -0
  96. ducpy-2.3.1/src/ducpy/Duc/DucRegion.py +84 -0
  97. ducpy-2.3.1/src/ducpy/Duc/DucStackLikeStyles.py +67 -0
  98. ducpy-2.3.1/src/ducpy/Duc/DucTableAutoSize.py +67 -0
  99. ducpy-2.3.1/src/ducpy/Duc/DucTableCell.py +127 -0
  100. ducpy-2.3.1/src/ducpy/Duc/DucTableCellEntry.py +71 -0
  101. ducpy-2.3.1/src/ducpy/Duc/DucTableCellSpan.py +67 -0
  102. ducpy-2.3.1/src/ducpy/Duc/DucTableCellStyle.py +105 -0
  103. ducpy-2.3.1/src/ducpy/Duc/DucTableColumn.py +84 -0
  104. ducpy-2.3.1/src/ducpy/Duc/DucTableColumnEntry.py +71 -0
  105. ducpy-2.3.1/src/ducpy/Duc/DucTableElement.py +280 -0
  106. ducpy-2.3.1/src/ducpy/Duc/DucTableRow.py +84 -0
  107. ducpy-2.3.1/src/ducpy/Duc/DucTableRowEntry.py +71 -0
  108. ducpy-2.3.1/src/ducpy/Duc/DucTableStyle.py +105 -0
  109. ducpy-2.3.1/src/ducpy/Duc/DucTextDynamicDictionarySource.py +54 -0
  110. ducpy-2.3.1/src/ducpy/Duc/DucTextDynamicElementSource.py +67 -0
  111. ducpy-2.3.1/src/ducpy/Duc/DucTextDynamicPart.py +101 -0
  112. ducpy-2.3.1/src/ducpy/Duc/DucTextDynamicSource.py +83 -0
  113. ducpy-2.3.1/src/ducpy/Duc/DucTextDynamicSourceData.py +8 -0
  114. ducpy-2.3.1/src/ducpy/Duc/DucTextElement.py +164 -0
  115. ducpy-2.3.1/src/ducpy/Duc/DucTextStyle.py +214 -0
  116. ducpy-2.3.1/src/ducpy/Duc/DucUcs.py +71 -0
  117. ducpy-2.3.1/src/ducpy/Duc/DucView.py +123 -0
  118. ducpy-2.3.1/src/ducpy/Duc/DucViewportElement.py +180 -0
  119. ducpy-2.3.1/src/ducpy/Duc/DucViewportStyle.py +54 -0
  120. ducpy-2.3.1/src/ducpy/Duc/DucXRayElement.py +122 -0
  121. ducpy-2.3.1/src/ducpy/Duc/DucXRayStyle.py +54 -0
  122. ducpy-2.3.1/src/ducpy/Duc/DynamicSnapSettings.py +80 -0
  123. ducpy-2.3.1/src/ducpy/Duc/ELEMENT_CONTENT_PREFERENCE.py +11 -0
  124. ducpy-2.3.1/src/ducpy/Duc/Element.py +28 -0
  125. ducpy-2.3.1/src/ducpy/Duc/ElementBackground.py +58 -0
  126. ducpy-2.3.1/src/ducpy/Duc/ElementContentBase.py +144 -0
  127. ducpy-2.3.1/src/ducpy/Duc/ElementStroke.py +118 -0
  128. ducpy-2.3.1/src/ducpy/Duc/ElementWrapper.py +70 -0
  129. ducpy-2.3.1/src/ducpy/Duc/ExportedDataState.py +566 -0
  130. ducpy-2.3.1/src/ducpy/Duc/FCFBetweenModifier.py +67 -0
  131. ducpy-2.3.1/src/ducpy/Duc/FCFDatumDefinition.py +71 -0
  132. ducpy-2.3.1/src/ducpy/Duc/FCFDatumStyle.py +54 -0
  133. ducpy-2.3.1/src/ducpy/Duc/FCFFrameModifiers.py +114 -0
  134. ducpy-2.3.1/src/ducpy/Duc/FCFLayoutStyle.py +80 -0
  135. ducpy-2.3.1/src/ducpy/Duc/FCFProjectedZoneModifier.py +54 -0
  136. ducpy-2.3.1/src/ducpy/Duc/FCFSegmentRow.py +78 -0
  137. ducpy-2.3.1/src/ducpy/Duc/FCFSymbolStyle.py +54 -0
  138. ducpy-2.3.1/src/ducpy/Duc/FEATURE_MODIFIER.py +21 -0
  139. ducpy-2.3.1/src/ducpy/Duc/FeatureControlFrameSegment.py +108 -0
  140. ducpy-2.3.1/src/ducpy/Duc/GDT_SYMBOL.py +25 -0
  141. ducpy-2.3.1/src/ducpy/Duc/GRID_DISPLAY_TYPE.py +9 -0
  142. ducpy-2.3.1/src/ducpy/Duc/GRID_TYPE.py +10 -0
  143. ducpy-2.3.1/src/ducpy/Duc/GeometricPoint.py +29 -0
  144. ducpy-2.3.1/src/ducpy/Duc/GridSettings.py +308 -0
  145. ducpy-2.3.1/src/ducpy/Duc/GridStyle.py +106 -0
  146. ducpy-2.3.1/src/ducpy/Duc/HANDLE_TYPE.py +7 -0
  147. ducpy-2.3.1/src/ducpy/Duc/HATCH_STYLE.py +8 -0
  148. ducpy-2.3.1/src/ducpy/Duc/HatchPatternLine.py +149 -0
  149. ducpy-2.3.1/src/ducpy/Duc/IMAGE_STATUS.py +8 -0
  150. ducpy-2.3.1/src/ducpy/Duc/IdentifiedCommonStyle.py +75 -0
  151. ducpy-2.3.1/src/ducpy/Duc/IdentifiedDimensionStyle.py +75 -0
  152. ducpy-2.3.1/src/ducpy/Duc/IdentifiedDocStyle.py +75 -0
  153. ducpy-2.3.1/src/ducpy/Duc/IdentifiedFCFStyle.py +75 -0
  154. ducpy-2.3.1/src/ducpy/Duc/IdentifiedGridSettings.py +75 -0
  155. ducpy-2.3.1/src/ducpy/Duc/IdentifiedHatchStyle.py +75 -0
  156. ducpy-2.3.1/src/ducpy/Duc/IdentifiedLeaderStyle.py +75 -0
  157. ducpy-2.3.1/src/ducpy/Duc/IdentifiedSnapSettings.py +75 -0
  158. ducpy-2.3.1/src/ducpy/Duc/IdentifiedStackLikeStyle.py +75 -0
  159. ducpy-2.3.1/src/ducpy/Duc/IdentifiedTableStyle.py +75 -0
  160. ducpy-2.3.1/src/ducpy/Duc/IdentifiedTextStyle.py +75 -0
  161. ducpy-2.3.1/src/ducpy/Duc/IdentifiedUcs.py +75 -0
  162. ducpy-2.3.1/src/ducpy/Duc/IdentifiedView.py +75 -0
  163. ducpy-2.3.1/src/ducpy/Duc/IdentifiedViewportStyle.py +75 -0
  164. ducpy-2.3.1/src/ducpy/Duc/IdentifiedXRayStyle.py +75 -0
  165. ducpy-2.3.1/src/ducpy/Duc/Identifier.py +80 -0
  166. ducpy-2.3.1/src/ducpy/Duc/ImageCrop.py +119 -0
  167. ducpy-2.3.1/src/ducpy/Duc/IsometricGridSettings.py +67 -0
  168. ducpy-2.3.1/src/ducpy/Duc/JSONPatchOperation.py +93 -0
  169. ducpy-2.3.1/src/ducpy/Duc/LEADER_CONTENT_TYPE.py +7 -0
  170. ducpy-2.3.1/src/ducpy/Duc/LINE_HEAD.py +20 -0
  171. ducpy-2.3.1/src/ducpy/Duc/LINE_SPACING_TYPE.py +8 -0
  172. ducpy-2.3.1/src/ducpy/Duc/LayerSnapFilters.py +105 -0
  173. ducpy-2.3.1/src/ducpy/Duc/LayerValidationRules.py +73 -0
  174. ducpy-2.3.1/src/ducpy/Duc/LeaderBlockContent.py +128 -0
  175. ducpy-2.3.1/src/ducpy/Duc/LeaderContent.py +83 -0
  176. ducpy-2.3.1/src/ducpy/Duc/LeaderContentData.py +8 -0
  177. ducpy-2.3.1/src/ducpy/Duc/LeaderTextBlockContent.py +54 -0
  178. ducpy-2.3.1/src/ducpy/Duc/LineSpacing.py +67 -0
  179. ducpy-2.3.1/src/ducpy/Duc/LinearUnitSystem.py +110 -0
  180. ducpy-2.3.1/src/ducpy/Duc/MARK_ELLIPSE_CENTER.py +7 -0
  181. ducpy-2.3.1/src/ducpy/Duc/MATERIAL_CONDITION.py +8 -0
  182. ducpy-2.3.1/src/ducpy/Duc/Margins.py +93 -0
  183. ducpy-2.3.1/src/ducpy/Duc/OBJECT_SNAP_MODE.py +25 -0
  184. ducpy-2.3.1/src/ducpy/Duc/PARAMETRIC_SOURCE_TYPE.py +7 -0
  185. ducpy-2.3.1/src/ducpy/Duc/PRUNING_LEVEL.py +8 -0
  186. ducpy-2.3.1/src/ducpy/Duc/ParagraphFormatting.py +158 -0
  187. ducpy-2.3.1/src/ducpy/Duc/ParametricSource.py +80 -0
  188. ducpy-2.3.1/src/ducpy/Duc/PlotLayout.py +58 -0
  189. ducpy-2.3.1/src/ducpy/Duc/PointBindingPoint.py +67 -0
  190. ducpy-2.3.1/src/ducpy/Duc/PolarGridSettings.py +80 -0
  191. ducpy-2.3.1/src/ducpy/Duc/PolarTrackingSettings.py +132 -0
  192. ducpy-2.3.1/src/ducpy/Duc/PrimaryUnits.py +75 -0
  193. ducpy-2.3.1/src/ducpy/Duc/SNAP_MARKER_SHAPE.py +9 -0
  194. ducpy-2.3.1/src/ducpy/Duc/SNAP_MODE.py +7 -0
  195. ducpy-2.3.1/src/ducpy/Duc/SNAP_OVERRIDE_BEHAVIOR.py +8 -0
  196. ducpy-2.3.1/src/ducpy/Duc/STACKED_TEXT_ALIGN.py +8 -0
  197. ducpy-2.3.1/src/ducpy/Duc/STROKE_CAP.py +8 -0
  198. ducpy-2.3.1/src/ducpy/Duc/STROKE_JOIN.py +8 -0
  199. ducpy-2.3.1/src/ducpy/Duc/STROKE_PLACEMENT.py +8 -0
  200. ducpy-2.3.1/src/ducpy/Duc/STROKE_PREFERENCE.py +9 -0
  201. ducpy-2.3.1/src/ducpy/Duc/STROKE_SIDE_PREFERENCE.py +11 -0
  202. ducpy-2.3.1/src/ducpy/Duc/STROKE_WIDTH.py +8 -0
  203. ducpy-2.3.1/src/ducpy/Duc/SnapMarkerSettings.py +117 -0
  204. ducpy-2.3.1/src/ducpy/Duc/SnapMarkerStyle.py +67 -0
  205. ducpy-2.3.1/src/ducpy/Duc/SnapMarkerStyleEntry.py +71 -0
  206. ducpy-2.3.1/src/ducpy/Duc/SnapOverride.py +67 -0
  207. ducpy-2.3.1/src/ducpy/Duc/SnapSettings.py +429 -0
  208. ducpy-2.3.1/src/ducpy/Duc/StackFormat.py +103 -0
  209. ducpy-2.3.1/src/ducpy/Duc/StackFormatProperties.py +80 -0
  210. ducpy-2.3.1/src/ducpy/Duc/Standard.py +169 -0
  211. ducpy-2.3.1/src/ducpy/Duc/StandardOverrides.py +285 -0
  212. ducpy-2.3.1/src/ducpy/Duc/StandardStyles.py +448 -0
  213. ducpy-2.3.1/src/ducpy/Duc/StandardUnits.py +75 -0
  214. ducpy-2.3.1/src/ducpy/Duc/StandardValidation.py +75 -0
  215. ducpy-2.3.1/src/ducpy/Duc/StandardViewSettings.py +189 -0
  216. ducpy-2.3.1/src/ducpy/Duc/StringValueEntry.py +67 -0
  217. ducpy-2.3.1/src/ducpy/Duc/StrokeSides.py +93 -0
  218. ducpy-2.3.1/src/ducpy/Duc/StrokeStyle.py +158 -0
  219. ducpy-2.3.1/src/ducpy/Duc/TABLE_CELL_ALIGNMENT.py +14 -0
  220. ducpy-2.3.1/src/ducpy/Duc/TABLE_FLOW_DIRECTION.py +7 -0
  221. ducpy-2.3.1/src/ducpy/Duc/TEXT_ALIGN.py +8 -0
  222. ducpy-2.3.1/src/ducpy/Duc/TEXT_FIELD_SOURCE_PROPERTY.py +16 -0
  223. ducpy-2.3.1/src/ducpy/Duc/TEXT_FIELD_SOURCE_TYPE.py +7 -0
  224. ducpy-2.3.1/src/ducpy/Duc/TEXT_FLOW_DIRECTION.py +9 -0
  225. ducpy-2.3.1/src/ducpy/Duc/TOLERANCE_DISPLAY.py +10 -0
  226. ducpy-2.3.1/src/ducpy/Duc/TOLERANCE_TYPE.py +8 -0
  227. ducpy-2.3.1/src/ducpy/Duc/TOLERANCE_ZONE_TYPE.py +10 -0
  228. ducpy-2.3.1/src/ducpy/Duc/TextColumn.py +67 -0
  229. ducpy-2.3.1/src/ducpy/Duc/TilingProperties.py +106 -0
  230. ducpy-2.3.1/src/ducpy/Duc/ToleranceClause.py +119 -0
  231. ducpy-2.3.1/src/ducpy/Duc/TrackingLineStyle.py +106 -0
  232. ducpy-2.3.1/src/ducpy/Duc/UNIT_SYSTEM.py +7 -0
  233. ducpy-2.3.1/src/ducpy/Duc/UnitPrecision.py +93 -0
  234. ducpy-2.3.1/src/ducpy/Duc/VERTICAL_ALIGN.py +8 -0
  235. ducpy-2.3.1/src/ducpy/Duc/VIEWPORT_SHADE_PLOT.py +9 -0
  236. ducpy-2.3.1/src/ducpy/Duc/VersionBase.py +119 -0
  237. ducpy-2.3.1/src/ducpy/Duc/VersionGraph.py +158 -0
  238. ducpy-2.3.1/src/ducpy/Duc/VersionGraphMetadata.py +67 -0
  239. ducpy-2.3.1/src/ducpy/Duc/YOUTUBE_STATES.py +11 -0
  240. ducpy-2.3.1/src/ducpy/Duc/_DucElementBase.py +542 -0
  241. ducpy-2.3.1/src/ducpy/Duc/_DucElementStylesBase.py +154 -0
  242. ducpy-2.3.1/src/ducpy/Duc/_DucLinearElementBase.py +220 -0
  243. ducpy-2.3.1/src/ducpy/Duc/_DucStackBase.py +136 -0
  244. ducpy-2.3.1/src/ducpy/Duc/_DucStackElementBase.py +114 -0
  245. ducpy-2.3.1/src/ducpy/Duc/_UnitSystemBase.py +93 -0
  246. ducpy-2.3.1/src/ducpy/Duc/__init__.py +0 -0
  247. ducpy-2.3.1/src/ducpy/__init__.py +45 -0
  248. ducpy-2.3.1/src/ducpy/_version.py +3 -0
  249. ducpy-2.3.1/src/ducpy/builders/__init__.py +8 -0
  250. ducpy-2.3.1/src/ducpy/builders/block_instance_builder.py +39 -0
  251. ducpy-2.3.1/src/ducpy/builders/block_utils.py +128 -0
  252. ducpy-2.3.1/src/ducpy/builders/element_builders.py +2164 -0
  253. ducpy-2.3.1/src/ducpy/builders/mutate_builder.py +66 -0
  254. ducpy-2.3.1/src/ducpy/builders/state_builders.py +1446 -0
  255. ducpy-2.3.1/src/ducpy/builders/style_builders.py +523 -0
  256. ducpy-2.3.1/src/ducpy/classes/DataStateClass.py +143 -0
  257. ducpy-2.3.1/src/ducpy/classes/ElementsClass.py +888 -0
  258. ducpy-2.3.1/src/ducpy/classes/StandardsClass.py +314 -0
  259. ducpy-2.3.1/src/ducpy/classes/__init__.py +4 -0
  260. ducpy-2.3.1/src/ducpy/parse.py +2396 -0
  261. ducpy-2.3.1/src/ducpy/serialize.py +3905 -0
  262. ducpy-2.3.1/src/ducpy/utils/__init__.py +4 -0
  263. ducpy-2.3.1/src/ducpy/utils/constants.py +18 -0
  264. ducpy-2.3.1/src/ducpy/utils/io.py +58 -0
  265. ducpy-2.3.1/src/ducpy/utils/mutate_utils.py +24 -0
  266. ducpy-2.3.1/src/ducpy/utils/rand_utils.py +20 -0
  267. ducpy-2.3.1/src/ducpy.egg-info/PKG-INFO +83 -0
  268. ducpy-2.3.1/src/ducpy.egg-info/SOURCES.txt +311 -0
  269. ducpy-2.3.1/src/ducpy.egg-info/dependency_links.txt +1 -0
  270. ducpy-2.3.1/src/ducpy.egg-info/requires.txt +2 -0
  271. ducpy-2.3.1/src/ducpy.egg-info/top_level.txt +3 -0
  272. ducpy-2.3.1/src/examples/a_duc_creation_demo.py +243 -0
  273. ducpy-2.3.1/src/examples/comprehensive_builders_demo.py +403 -0
  274. ducpy-2.3.1/src/examples/element_creation_demo.py +205 -0
  275. ducpy-2.3.1/src/examples/external_files_demo.py +82 -0
  276. ducpy-2.3.1/src/examples/mutation_demo.py +62 -0
  277. ducpy-2.3.1/src/examples/read_write_demo.py +57 -0
  278. ducpy-2.3.1/src/examples/standard_creation_demo.py +370 -0
  279. ducpy-2.3.1/src/examples/style_creation_demo.py +259 -0
  280. ducpy-2.3.1/src/tests/.gitignore +1 -0
  281. ducpy-2.3.1/src/tests/README.md +12 -0
  282. ducpy-2.3.1/src/tests/__init__.py +1 -0
  283. ducpy-2.3.1/src/tests/conftest.py +60 -0
  284. ducpy-2.3.1/src/tests/pretty_print_duc.py +31 -0
  285. ducpy-2.3.1/src/tests/src/test_CSPMDS_blocks_and_instances.py +326 -0
  286. ducpy-2.3.1/src/tests/src/test_CSPMDS_complex_tables.py +382 -0
  287. ducpy-2.3.1/src/tests/src/test_CSPMDS_dimension_elements.py +332 -0
  288. ducpy-2.3.1/src/tests/src/test_CSPMDS_grids_and_snapping.py +262 -0
  289. ducpy-2.3.1/src/tests/src/test_CSPMDS_layers.py +269 -0
  290. ducpy-2.3.1/src/tests/src/test_CSPMDS_local_and_global_states.py +166 -0
  291. ducpy-2.3.1/src/tests/src/test_CSPMDS_regions.py +207 -0
  292. ducpy-2.3.1/src/tests/src/test_CSPMDS_standards.py +1779 -0
  293. ducpy-2.3.1/src/tests/src/test_CSPMDS_text_and_doc_elements.py +502 -0
  294. ducpy-2.3.1/src/tests/src/test_CSPMDS_tolerances.py +232 -0
  295. ducpy-2.3.1/src/tests/src/test_CSPMDS_version_graph.py +184 -0
  296. ducpy-2.3.1/src/tests/src/test_a_duc_with_everything.py +630 -0
  297. ducpy-2.3.1/src/tests/src/test_add_100_rand_elements.py +92 -0
  298. ducpy-2.3.1/src/tests/src/test_builder_comprehensive.py +313 -0
  299. ducpy-2.3.1/src/tests/src/test_create_complex_line_paths.py +250 -0
  300. ducpy-2.3.1/src/tests/src/test_create_duc_with_100_connected.py +175 -0
  301. ducpy-2.3.1/src/tests/src/test_create_image_element_with_external_file.py +64 -0
  302. ducpy-2.3.1/src/tests/src/test_create_varied_ellipses_and_polygons.py +114 -0
  303. ducpy-2.3.1/src/tests/src/test_create_varied_freedraw_writing.py +133 -0
  304. ducpy-2.3.1/src/tests/src/test_examples.py +240 -0
  305. ducpy-2.3.1/src/tests/src/test_hatching_patterns.py +278 -0
  306. ducpy-2.3.1/src/tests/src/test_move_elements_rand.py +89 -0
  307. ducpy-2.3.1/src/tests/src/test_mutate_elements.py +110 -0
  308. ducpy-2.3.1/src/tests/src/test_override_capabilities.py +257 -0
  309. ducpy-2.3.1/src/tests/src/test_pdf_image_elements.py +195 -0
  310. ducpy-2.3.1/src/tests/src/test_plot_elements.py +325 -0
  311. ducpy-2.3.1/src/tests/src/test_serialize_two_rectangles.py +65 -0
  312. ducpy-2.3.1/src/tests/src/test_stack_elements.py +188 -0
  313. ducpy-2.3.1/uv.lock +744 -0
ducpy-2.3.1/.gitignore ADDED
@@ -0,0 +1,170 @@
1
+ # Test files
2
+ dist/
3
+ inputs/
4
+
5
+ # Auto-generated version file
6
+ **/_version.py
7
+
8
+
9
+ # Byte-compiled / optimized / DLL files
10
+ __pycache__/
11
+ *.py[cod]
12
+ *$py.class
13
+
14
+ # C extensions
15
+ *.so
16
+
17
+ # Distribution / packaging
18
+ .Python
19
+ build/
20
+ develop-eggs/
21
+ dist/
22
+ downloads/
23
+ eggs/
24
+ .eggs/
25
+ lib/
26
+ lib64/
27
+ parts/
28
+ sdist/
29
+ var/
30
+ wheels/
31
+ share/python-wheels/
32
+ *.egg-info/
33
+ .installed.cfg
34
+ *.egg
35
+ MANIFEST
36
+
37
+ # PyInstaller
38
+ # Usually these files are written by a python script from a template
39
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
40
+ *.manifest
41
+ *.spec
42
+
43
+ # Installer logs
44
+ pip-log.txt
45
+ pip-delete-this-directory.txt
46
+
47
+ # Unit test / coverage reports
48
+ htmlcov/
49
+ .tox/
50
+ .nox/
51
+ .coverage
52
+ .coverage.*
53
+ .cache
54
+ nosetests.xml
55
+ coverage.xml
56
+ *.cover
57
+ *.py,cover
58
+ .hypothesis/
59
+ .pytest_cache/
60
+ cover/
61
+
62
+ # Translations
63
+ *.mo
64
+ *.pot
65
+
66
+ # Django stuff:
67
+ *.log
68
+ local_settings.py
69
+ db.sqlite3
70
+ db.sqlite3-journal
71
+
72
+ # Flask stuff:
73
+ instance/
74
+ .webassets-cache
75
+
76
+ # Scrapy stuff:
77
+ .scrapy
78
+
79
+ # Sphinx documentation
80
+ docs/_build/
81
+
82
+ # PyBuilder
83
+ .pybuilder/
84
+ target/
85
+
86
+ # Jupyter Notebook
87
+ .ipynb_checkpoints
88
+
89
+ # IPython
90
+ profile_default/
91
+ ipython_config.py
92
+
93
+ # pyenv
94
+ # For a library or package, you might want to ignore these files since the code is
95
+ # intended to run in multiple environments; otherwise, check them in:
96
+ # .python-version
97
+
98
+ # pipenv
99
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
100
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
101
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
102
+ # install all needed dependencies.
103
+ #Pipfile.lock
104
+
105
+ # poetry
106
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
107
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
108
+ # commonly ignored for libraries.
109
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
110
+ #poetry.lock
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ #pdm.lock
115
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
116
+ # in version control.
117
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
118
+ .pdm.toml
119
+ .pdm-python
120
+ .pdm-build/
121
+
122
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
123
+ __pypackages__/
124
+
125
+ # Celery stuff
126
+ celerybeat-schedule
127
+ celerybeat.pid
128
+
129
+ # SageMath parsed files
130
+ *.sage.py
131
+
132
+ # Environments
133
+ .env
134
+ .venv
135
+ env/
136
+ venv/
137
+ ENV/
138
+ env.bak/
139
+ venv.bak/
140
+
141
+ # Spyder project settings
142
+ .spyderproject
143
+ .spyproject
144
+
145
+ # Rope project settings
146
+ .ropeproject
147
+
148
+ # mkdocs documentation
149
+ /site
150
+
151
+ # mypy
152
+ .mypy_cache/
153
+ .dmypy.json
154
+ dmypy.json
155
+
156
+ # Pyre type checker
157
+ .pyre/
158
+
159
+ # pytype static type analyzer
160
+ .pytype/
161
+
162
+ # Cython debug symbols
163
+ cython_debug/
164
+
165
+ # PyCharm
166
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
167
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
168
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
169
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
170
+ #.idea/
ducpy-2.3.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ducflair
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
ducpy-2.3.1/PKG-INFO ADDED
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.4
2
+ Name: ducpy
3
+ Version: 2.3.1
4
+ Summary: The library for the Duc 2D CAD file format
5
+ Author: Jorge Soares
6
+ Author-email: Ducflair <support@ducflair.com>
7
+ License: MIT
8
+ Project-URL: Homepage, https://duc.ducflair.com
9
+ Project-URL: Source, https://github.com/ducflair/duc/tree/main/packages/ducpy
10
+ Project-URL: Documentation, https://python.duc.ducflair.com
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Requires-Python: >=3.10
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: flatbuffers>=25.2.10
16
+ Requires-Dist: nanoid>=2.0.0
17
+ Dynamic: license-file
18
+
19
+ # ducpy (Python)
20
+
21
+ <p align="center">
22
+ <br/>
23
+ <a href="https://duc.ducflair.com" target="_blank"><img width="256px" src="https://raw.githubusercontent.com/ducflair/assets/refs/heads/main/src/duc/duc-extended.png" /></a>
24
+ <p align="center">2D CAD File Format</p>
25
+ <p align="center" style="align: center;">
26
+ <a href="https://pypi.org/project/ducpy/"><img src="https://shields.io/badge/Pip-blue?logo=Pypi&logoColor=white&style=round-square" alt="Pip" /></a>
27
+ <a href="https://github.com/ducflair/duc/releases"><img src="https://img.shields.io/pypi/v/ducpy?style=round-square&label=latest%20stable" alt="PyPI ducpy@latest release" /></a>
28
+ <a href="https://pypi.org/project/ducpy/"><img src="https://img.shields.io/pypi/dm/ducpy?style=round-square&color=salmon" alt="Downloads" /></a>
29
+ <img src="https://shields.io/badge/Python-ffde57?logo=Python&logoColor=646464&style=round-square" alt="Python" />
30
+ </p>
31
+ </p>
32
+
33
+
34
+ The `ducpy` package provides a robust Python implementation for the `duc` 2D CAD file format, a cornerstone of our advanced design system. Designed for professionals seeking precision and efficiency, this package ensures seamless integration and manipulation of `duc` files within your Python projects.
35
+
36
+ ## Introduction
37
+
38
+ The `ducpy` package offers comprehensive Python types and helper functions to work effortlessly with the `duc` CAD file format. Built with efficiency and performance in mind, this package enables you to parse, validate, and manipulate `duc` files with ease.
39
+
40
+ ## Features
41
+
42
+ - **Python Support:** Strongly-typed interfaces for all aspects of the `duc` file format, ensuring type safety and IDE support.
43
+ - **Utility Functions:** Easy-to-use functions for parsing, validating, and manipulating `duc` files.
44
+ - **Extensible Architecture:** Designed to integrate seamlessly with other `ducflair` packages and your custom tools.
45
+ - **Performance Optimized:** Efficient processing to handle complex CAD data with ease.
46
+
47
+ ## Installation
48
+
49
+ Install the package using pip:
50
+
51
+ ```bash
52
+ pip install ducpy
53
+ ```
54
+
55
+ ## Usage
56
+
57
+ ```python
58
+ import ducpy as duc
59
+ ```
60
+
61
+ ## Documentation
62
+
63
+ For detailed documentation, including all available types and utility functions, visit our [Documentation](https://duc.ducflair.com).
64
+
65
+ ## Tools
66
+
67
+ - [Playground](https://scopture.com): Experiment with the `duc` format in a live environment.
68
+
69
+ ## Contributing
70
+
71
+ At the moment we are not accepting contributions to this package. However, we welcome feedback and suggestions for future improvements. Feel free to open an issue or contact us at [Ducflair Support](https://www.ducflair.com/support).
72
+
73
+ ## License
74
+
75
+ This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
76
+
77
+ ## Commit Message Guidelines
78
+
79
+ To ensure smooth releases with semantic-release, please follow [these guidelines](https://semantic-release.gitbook.io/semantic-release#how-does-it-work).
80
+
81
+ ---
82
+
83
+ *The duc format and libraries are constantly evolving, aiming to set new standards in the 2D CAD industry. Be a part of this transformation and help shape the future of design technology!*
ducpy-2.3.1/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # ducpy (Python)
2
+
3
+ <p align="center">
4
+ <br/>
5
+ <a href="https://duc.ducflair.com" target="_blank"><img width="256px" src="https://raw.githubusercontent.com/ducflair/assets/refs/heads/main/src/duc/duc-extended.png" /></a>
6
+ <p align="center">2D CAD File Format</p>
7
+ <p align="center" style="align: center;">
8
+ <a href="https://pypi.org/project/ducpy/"><img src="https://shields.io/badge/Pip-blue?logo=Pypi&logoColor=white&style=round-square" alt="Pip" /></a>
9
+ <a href="https://github.com/ducflair/duc/releases"><img src="https://img.shields.io/pypi/v/ducpy?style=round-square&label=latest%20stable" alt="PyPI ducpy@latest release" /></a>
10
+ <a href="https://pypi.org/project/ducpy/"><img src="https://img.shields.io/pypi/dm/ducpy?style=round-square&color=salmon" alt="Downloads" /></a>
11
+ <img src="https://shields.io/badge/Python-ffde57?logo=Python&logoColor=646464&style=round-square" alt="Python" />
12
+ </p>
13
+ </p>
14
+
15
+
16
+ The `ducpy` package provides a robust Python implementation for the `duc` 2D CAD file format, a cornerstone of our advanced design system. Designed for professionals seeking precision and efficiency, this package ensures seamless integration and manipulation of `duc` files within your Python projects.
17
+
18
+ ## Introduction
19
+
20
+ The `ducpy` package offers comprehensive Python types and helper functions to work effortlessly with the `duc` CAD file format. Built with efficiency and performance in mind, this package enables you to parse, validate, and manipulate `duc` files with ease.
21
+
22
+ ## Features
23
+
24
+ - **Python Support:** Strongly-typed interfaces for all aspects of the `duc` file format, ensuring type safety and IDE support.
25
+ - **Utility Functions:** Easy-to-use functions for parsing, validating, and manipulating `duc` files.
26
+ - **Extensible Architecture:** Designed to integrate seamlessly with other `ducflair` packages and your custom tools.
27
+ - **Performance Optimized:** Efficient processing to handle complex CAD data with ease.
28
+
29
+ ## Installation
30
+
31
+ Install the package using pip:
32
+
33
+ ```bash
34
+ pip install ducpy
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ```python
40
+ import ducpy as duc
41
+ ```
42
+
43
+ ## Documentation
44
+
45
+ For detailed documentation, including all available types and utility functions, visit our [Documentation](https://duc.ducflair.com).
46
+
47
+ ## Tools
48
+
49
+ - [Playground](https://scopture.com): Experiment with the `duc` format in a live environment.
50
+
51
+ ## Contributing
52
+
53
+ At the moment we are not accepting contributions to this package. However, we welcome feedback and suggestions for future improvements. Feel free to open an issue or contact us at [Ducflair Support](https://www.ducflair.com/support).
54
+
55
+ ## License
56
+
57
+ This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
58
+
59
+ ## Commit Message Guidelines
60
+
61
+ To ensure smooth releases with semantic-release, please follow [these guidelines](https://semantic-release.gitbook.io/semantic-release#how-does-it-work).
62
+
63
+ ---
64
+
65
+ *The duc format and libraries are constantly evolving, aiming to set new standards in the 2D CAD industry. Be a part of this transformation and help shape the future of design technology!*
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,47 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+
9
+ project = 'ducpy'
10
+ copyright = '2025, Ducflair'
11
+ author = 'Ducflair'
12
+
13
+ # -- General configuration ---------------------------------------------------
14
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
15
+
16
+ extensions = [
17
+ ]
18
+
19
+ templates_path = ['_templates']
20
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
21
+
22
+
23
+
24
+ # -- Options for HTML output -------------------------------------------------
25
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
26
+
27
+ html_theme = "furo"
28
+ html_static_path = ['_static']
29
+
30
+ extensions.append('autoapi.extension')
31
+ autoapi_dirs = ["../src/ducpy"]
32
+ # autoapi_keep_files = True
33
+ autoapi_root = "autoapi"
34
+ autoapi_add_toctree_entry = True
35
+ autoapi_options = [
36
+ 'members',
37
+ 'undoc-members',
38
+ 'private-members',
39
+ 'show-inheritance',
40
+ 'show-module-summary',
41
+ 'special-members',
42
+ ]
43
+ autoapi_python_use_implicit_namespaces = True
44
+ autoapi_python_class_content = 'both'
45
+ autoapi_module_name_override = {
46
+ 'src.ducpy': 'ducpy',
47
+ }
@@ -0,0 +1,8 @@
1
+ ducpy
2
+ ===================
3
+
4
+ .. toctree::
5
+ :maxdepth: 2
6
+ :caption: Contents:
7
+
8
+ autoapi/index
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+
13
+ %SPHINXBUILD% >NUL 2>NUL
14
+ if errorlevel 9009 (
15
+ echo.
16
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17
+ echo.installed, then set the SPHINXBUILD environment variable to point
18
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
19
+ echo.may add the Sphinx directory to PATH.
20
+ echo.
21
+ echo.If you don't have Sphinx installed, grab it from
22
+ echo.https://www.sphinx-doc.org/
23
+ exit /b 1
24
+ )
25
+
26
+ if "%1" == "" goto help
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "ducpy",
3
+ "version": "0.0.0-development",
4
+ "private": true,
5
+ "scripts": {
6
+ "build": "bash -c 'SETUPTOOLS_SCM_PRETEND_VERSION=${1} uv build' --",
7
+ "gen:docs": "bun clean:docs && cd docs && uv run make html",
8
+ "clean:docs": "cd docs && uv run make clean",
9
+ "test": "uv run -m pytest src/tests/src/test_*.py",
10
+ "test:verbose": "uv run -m pytest -v src/tests/src/test_*.py",
11
+ "prerelease": "uv sync && bun run test",
12
+ "semantic-release": "semantic-release"
13
+ },
14
+ "devDependencies": {
15
+ "semantic-release": "^24.1.2"
16
+ }
17
+ }
@@ -0,0 +1,57 @@
1
+ [project]
2
+ name = "ducpy"
3
+ dynamic = ["version"]
4
+ description = "The library for the Duc 2D CAD file format"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "flatbuffers>=25.2.10",
9
+ "nanoid>=2.0.0",
10
+ ]
11
+
12
+ license = { text = "MIT" }
13
+
14
+ authors = [
15
+ { name = "Ducflair", email = "support@ducflair.com" },
16
+ { name = "Jorge Soares" }
17
+ ]
18
+
19
+ classifiers = [
20
+ "License :: OSI Approved :: MIT License",
21
+ ]
22
+
23
+ [project.urls]
24
+ "Homepage" = "https://duc.ducflair.com"
25
+ "Source" = "https://github.com/ducflair/duc/tree/main/packages/ducpy"
26
+ "Documentation" = "https://python.duc.ducflair.com"
27
+
28
+ [build-system]
29
+ requires = ["setuptools>=63.0", "setuptools-scm>=8.0", "wheel"]
30
+ build-backend = "setuptools.build_meta"
31
+
32
+ [tool.setuptools]
33
+ # Tells setuptools to find packages in the 'src' directory.
34
+ # This replaces find_packages(where='src') and package_dir={'': 'src'} from setup.py.
35
+ [tool.setuptools.packages.find]
36
+ where = ["src"]
37
+
38
+ [tool.setuptools_scm]
39
+ version_scheme = "guess-next-dev"
40
+ local_scheme = "node-and-date"
41
+ fallback_version = "0.1.0"
42
+
43
+ [dependency-groups]
44
+ dev = [
45
+ "furo>=2024.8.6",
46
+ "sphinx>=8.1.3",
47
+ "sphinx-autoapi>=3.6.0",
48
+ "pytest>=8.3.5",
49
+ "numpy>=1.20.0",
50
+ "rich>=13.0.0",
51
+ ]
52
+
53
+
54
+ [tool.pytest.ini_options]
55
+ testpaths = ["src/tests"]
56
+ python_files = "test_*.py"
57
+ addopts = "-vv"
@@ -0,0 +1,24 @@
1
+ module.exports = {
2
+ branches: ["main", { name: "next", prerelease: true }, { name: "dev", prerelease: true }],
3
+ plugins: [
4
+ [
5
+ require.resolve("../../scripts/semrel-path-filter.cjs"),
6
+ {
7
+ paths: [
8
+ "packages/ducpy"
9
+ ],
10
+ analyzer: { preset: "conventionalcommits" },
11
+ notes: { preset: "conventionalcommits" },
12
+ },
13
+ ],
14
+ [
15
+ "@semantic-release/exec",
16
+ {
17
+ prepareCmd: "bun prerelease && bun run build ${nextRelease.version}",
18
+ publishCmd: "uv publish --token ${process.env.PYPI_TOKEN}",
19
+ },
20
+ ],
21
+ "@semantic-release/github",
22
+ ],
23
+ tagFormat: "ducpy@${version}",
24
+ };
ducpy-2.3.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
ducpy-2.3.1/setup.py ADDED
@@ -0,0 +1,63 @@
1
+ import os
2
+ import re
3
+ from setuptools import setup
4
+
5
+ # Path to the schema file, relative to this setup.py file
6
+ # setup.py is in packages/ducpy/
7
+ # schema/duc.fbs is at the workspace root, so ../../schema/duc.fbs
8
+ SCHEMA_FILE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'schema', 'duc.fbs')
9
+ # Path where _version.py will be written
10
+ VERSION_PY_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'src', 'ducpy', '_version.py')
11
+
12
+ def get_schema_version_from_fbs(fbs_file_path):
13
+ try:
14
+ with open(fbs_file_path, 'r') as f:
15
+ first_line = f.readline()
16
+ match = re.search(r'//\s*SCHEMA_VERSION\s*=\s*([0-9.]+)', first_line)
17
+ if match:
18
+ return match.group(1)
19
+ except FileNotFoundError:
20
+ # This is expected when building from sdist where schema file isn't present
21
+ return None # Return None to indicate schema file was not found
22
+ except Exception as e:
23
+ print(f"Warning: Could not parse schema version from {fbs_file_path}: {e}. Defaulting to 0.0.0.")
24
+ return "0.0.0" # Default version if parsing fails but file was found
25
+
26
+ def generate_version_py():
27
+ """Generates the _version.py file with DUC_SCHEMA_VERSION."""
28
+ schema_version_from_fbs = get_schema_version_from_fbs(SCHEMA_FILE_PATH)
29
+
30
+ if schema_version_from_fbs is not None:
31
+ # Schema file was found (development or first-pass build)
32
+ # Or if it was found but parsing failed (defaulted to 0 by get_schema_version_from_fbs)
33
+ # always regenerate _version.py
34
+ print(f"Generating DUC schema version file at: {VERSION_PY_PATH} with version: {schema_version_from_fbs}")
35
+ os.makedirs(os.path.dirname(VERSION_PY_PATH), exist_ok=True)
36
+ with open(VERSION_PY_PATH, 'w') as f:
37
+ f.write(f'# This file is auto-generated by setup.py when the package is built.\n')
38
+ f.write(f'# Do not edit this file manually.\n')
39
+ f.write(f'DUC_SCHEMA_VERSION = "{schema_version_from_fbs}"\n')
40
+ elif os.path.exists(VERSION_PY_PATH):
41
+ # Schema file not found (likely sdist build) AND _version.py already exists.
42
+ # Trust the existing _version.py from the sdist.
43
+ print(f"DUC schema file not found. Using existing _version.py: {VERSION_PY_PATH}")
44
+ else:
45
+ # Schema file not found AND _version.py does not exist (edge case, should not happen with sdist).
46
+ # Fallback to generating with default 0.0.0 to ensure the file exists for import.
47
+ print(f"DUC schema file not found and _version.py does not exist. Generating with default version 0.0.0 at: {VERSION_PY_PATH}")
48
+ os.makedirs(os.path.dirname(VERSION_PY_PATH), exist_ok=True)
49
+ with open(VERSION_PY_PATH, 'w') as f:
50
+ f.write(f'# This file is auto-generated by setup.py (fallback).\n')
51
+ f.write(f'DUC_SCHEMA_VERSION = "0.0.0"\n')
52
+
53
+ # --- Main part of setup.py ---
54
+
55
+ # Generate the version file when setup.py is processed by the build system.
56
+ generate_version_py()
57
+
58
+ # Minimal setup call.
59
+ # Most package metadata (name, version via setuptools-scm, etc.) and
60
+ # package discovery are handled by pyproject.toml.
61
+ # This setup.py is present for compatibility and can be used for tasks
62
+ # like C-extension building or build-time file generation if needed.
63
+ setup()
@@ -0,0 +1 @@
1
+ from . import ducpy
@@ -0,0 +1,10 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: Duc
4
+
5
+ class ANGULAR_UNITS_FORMAT(object):
6
+ DECIMAL_DEGREES = 10
7
+ DEGREES_MINUTES_SECONDS = 11
8
+ GRADS = 12
9
+ RADIANS = 13
10
+ SURVEYOR = 14
@@ -0,0 +1,8 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: Duc
4
+
5
+ class AXIS(object):
6
+ X = 10
7
+ Y = 20
8
+ Z = 30